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

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

Constant Summary

ParseError =
::Yajl::ParseError

Instance Method Summary (collapse)

Instance Method Details

- (Object) decode(json)

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



11
12
13
14
15
16
17
18
# File 'activesupport/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