Module: OEmbed::Formatter::JSON::Backends::ActiveSupportJSON

Extended by:
ActiveSupportJSON
Included in:
ActiveSupportJSON
Defined in:
lib/oembed/formatter/json/backends/activesupportjson.rb

Instance Method Summary collapse

Instance Method Details

#decode(json) ⇒ Object

Parses a JSON string or IO and convert it into an object.



12
13
14
# File 'lib/oembed/formatter/json/backends/activesupportjson.rb', line 12

def decode(json)
  ::ActiveSupport::JSON.decode(json)
end

#decode_fail_msgObject



16
17
18
# File 'lib/oembed/formatter/json/backends/activesupportjson.rb', line 16

def decode_fail_msg
  "The version of ActiveSupport::JSON you have installed isn't parsing JSON like ruby-oembed expected."
end

#parse_errorObject



20
21
22
# File 'lib/oembed/formatter/json/backends/activesupportjson.rb', line 20

def parse_error
  ::ActiveSupport::JSON.parse_error
end