Module: ActiveSupport::JSON::Backends::Yajl

Extended by:
Yajl
Included in:
Yajl
Defined in:
lib/active_support/json/backends/yajl.rb

Constant Summary collapse

ParseError =
::Yajl::ParseError

Instance Method Summary collapse

Instance Method Details

#decode(json) ⇒ Object

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



11
12
13
14
15
16
17
18
# File 'lib/active_support/json/backends/yajl.rb', line 11

def decode(json)
  data = ::Yajl::Parser.new.parse(json)
  if ActiveSupport.parse_json_times
    convert_dates_from(data)
  else
    data
  end
end