Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v3.0.9) is shown here.
decode(json)
public
Parses a JSON string or IO and converts it into an object
# File activesupport/lib/active_support/json/backends/yaml.rb, line 18
def decode(json)
if json.respond_to?(:read)
json = json.read
end
YAML.load(convert_json_to_yaml(json))
rescue *EXCEPTIONS => e
raise ParseError, "Invalid JSON string: '%s'" % json
end