Method: MultiJson.decode

Defined in:
lib/multi_json.rb

.decode(string, options = {}) ⇒ Object

Decode a JSON string into Ruby.

Options

:symbolize_keys

If true, will use symbols instead of strings for the keys.



80
81
82
83
84
# File 'lib/multi_json.rb', line 80

def decode(string, options = {})
  engine.decode(string, options)
rescue engine::ParseError => exception
  raise DecodeError.new(exception.message, exception.backtrace, string)
end