class method
self.decode
Ruby on Rails 2.2.3
Since v2.2.3Signature
self.decode(json)
Converts a JSON string into a Ruby object.
Parameters
-
jsonreq
Source
# File activesupport/lib/active_support/json/decoding.rb, line 11
def decode(json)
YAML.load(convert_json_to_yaml(json))
rescue ArgumentError => e
raise ParseError, "Invalid JSON string"
end
Defined in activesupport/lib/active_support/json/decoding.rb line 11
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::JSON