MultiJson::Adapters::JsonCommon

Public Instance Methods

dump(object, options={}) click to toggle source
    # File lib/multi_json/adapters/json_common.rb, line 10
10:       def dump(object, options={})
11:         object.to_json(process_options(options))
12:       end
load(string, options={}) click to toggle source
   # File lib/multi_json/adapters/json_common.rb, line 5
5:       def load(string, options={})
6:         string = string.read if string.respond_to?(:read)
7:         ::JSON.parse(string, :symbolize_names => options[:symbolize_keys])
8:       end

Protected Instance Methods

process_options(options={}) click to toggle source
    # File lib/multi_json/adapters/json_common.rb, line 16
16:       def process_options(options={})
17:         return options if options.empty?
18:         opts = {}
19:         opts.merge!(JSON::PRETTY_STATE_PROTOTYPE.to_h) if options.delete(:pretty)
20:         opts.merge!(options)
21:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.