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
-
#dump(object, options = {}) ⇒ Object
:nodoc:.
-
#load(string, options = {}) ⇒ Object
:nodoc:.
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, ={}) #:nodoc: ::Gson::Encoder.new().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, ={}) #:nodoc: ::Gson::Decoder.new().decode(string) end |