Module: MultiJson::Adapters::Gson

Extended by:
Gson
Included in:
Gson
Defined in:
lib/vendor/multi_json/lib/multi_json/adapters/gson.rb

Overview

Use the gson.rb library to dump/load.

Constant Summary collapse

ParseError =
::Gson::DecodeError

Instance Method Summary collapse

Instance Method Details

#dump(object, options = {}) ⇒ Object

:nodoc:


15
16
17
# File 'lib/vendor/multi_json/lib/multi_json/adapters/gson.rb', line 15

def dump(object, options={}) #:nodoc:
  ::Gson::Encoder.new(options).encode(object)
end

#load(string, options = {}) ⇒ Object

:nodoc:


11
12
13
# File 'lib/vendor/multi_json/lib/multi_json/adapters/gson.rb', line 11

def load(string, options={}) #:nodoc:
  ::Gson::Decoder.new(options).decode(string)
end