Sha256: 6ce1decbc27fbda7968eb13ed38b8ec6ba776f9b0ae25457c97c8a065e185bd4

Contents?: true

Size: 170 Bytes

Versions: 59

Compression:

Stored size: 170 Bytes

Contents

# frozen_string_literal: true

# Object  extensions for atome

class String
  def is_json?
    begin
      !JSON.parse(self).nil?
    rescue
      false
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
atome-0.5.7.6.0 vendor/assets/server/extensions.rb
atome-0.5.7.5.9 vendor/assets/server/extensions.rb
atome-0.5.7.5.4 vendor/assets/server/extensions.rb
atome-0.5.7.5.3 vendor/assets/server/extensions.rb
atome-0.5.7.5.1 vendor/assets/server/extensions.rb
atome-0.5.7.4.8 vendor/assets/server/extensions.rb
atome-0.5.7.4.7 vendor/assets/server/extensions.rb
atome-0.5.7.4.6 vendor/assets/server/extensions.rb
atome-0.5.7.4.3 vendor/assets/server/extensions.rb
atome-0.5.7.4.2 vendor/assets/server/extensions.rb
atome-0.5.7.3.9 vendor/assets/server/extensions.rb
atome-0.5.7.3.6 vendor/assets/server/extensions.rb
atome-0.5.7.3.5 vendor/assets/server/extensions.rb
atome-0.5.7.3.3 vendor/assets/server/extensions.rb
atome-0.5.7.3.2 vendor/assets/server/extensions.rb
atome-0.5.7.3.1 vendor/assets/server/extensions.rb
atome-0.5.7.3.0 vendor/assets/server/extensions.rb
atome-0.5.7.1.8 vendor/assets/server/extensions.rb
atome-0.5.7.1.7 vendor/assets/server/extensions.rb
atome-0.5.7.1.0 vendor/assets/server/extensions.rb