Module: MultiJson::Adapters::JsonCommon
Instance Method Summary collapse
Instance Method Details
#dump(object, options = {}) ⇒ Object
10 11 12 |
# File 'lib/multi_json/adapters/json_common.rb', line 10 def dump(object, ={}) object.to_json(()) end |
#load(string, options = {}) ⇒ Object
5 6 7 8 |
# File 'lib/multi_json/adapters/json_common.rb', line 5 def load(string, ={}) string = string.read if string.respond_to?(:read) ::JSON.parse(string, :symbolize_names => [:symbolize_keys]) end |