Method: MultiJson.load
- Defined in:
- lib/multi_json.rb
.load(string, options = {}) ⇒ Object Also known as: decode
Decode a JSON string into Ruby.
Options
:symbolize_keys-
If true, will use symbols instead of strings for the keys.
:adapter-
If set, the selected engine will be used just for the call.
93 94 95 96 97 98 99 100 |
# File 'lib/multi_json.rb', line 93 def load(string, ={}) adapter = current_adapter() begin adapter.load(string, ) rescue adapter::ParseError => exception raise DecodeError.new(exception., exception.backtrace, string) end end |