class MultiJson::Adapters::Oj - multi_json-1.10.1 Documentation

# class MultiJson::Adapters::Oj

Use the Oj library to dump/load.

### Constants

ParseError

### Public Instance Methods

dump(object, options={}) click to toggle source

    # File lib/multi_json/adapters/oj.rb, line 18
    def dump(object, options={})
      options.merge!(:indent => 2) if options[:pretty]
      options[:indent] = options[:indent].to_i if options[:indent]
      ::Oj.dump(object, options)
    end

load(string, options={}) click to toggle source

    # File lib/multi_json/adapters/oj.rb, line 13
    def load(string, options={})
      options[:symbol_keys] = options.delete(:symbolize_keys)
      ::Oj.load(string, options)
    end