Module: ActiveSupport::JSON::Backends::Yaml
Constant Summary collapse
- ParseError =
::StandardError
Instance Method Summary collapse
-
#decode(json) ⇒ Object
Converts a JSON string into a Ruby object.
Instance Method Details
#decode(json) ⇒ Object
Converts a JSON string into a Ruby object.
11 12 13 14 15 |
# File 'lib/active_support/json/backends/yaml.rb', line 11 def decode(json) YAML.load(convert_json_to_yaml(json)) rescue ArgumentError => e raise ParseError, "Invalid JSON string" end |