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

# class MultiJson::Adapters::Gson

Use the gson.rb library to dump/load.

### Constants

ParseError

### Public Instance Methods

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

    # File lib/multi_json/adapters/gson.rb, line 16
    def dump(object, options={})
      ::Gson::Encoder.new(options).encode(object)
    end

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

    # File lib/multi_json/adapters/gson.rb, line 11
    def load(string, options={})
      string = string.read if StringIO === string
      ::Gson::Decoder.new(options).decode(string)
    end