instance method
decode
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v3.0.20Available in: v2.3.18 v3.0.20
Signature
decode(json)
Parses a JSON string or IO and convert it into an object
Parameters
-
jsonreq
Source
# 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
Defined in activesupport/lib/active_support/json/backends/yajl.rb line 11
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::JSON::Backends::Yajl