Class: MultiJson::Adapters::Gson
- Inherits:
-
MultiJson::Adapter
- Object
- MultiJson::Adapter
- MultiJson::Adapters::Gson
- Defined in:
- 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
Methods inherited from MultiJson::Adapter
Methods included from Options
#default_dump_options, #default_load_options, #dump_options, #dump_options=, #load_options, #load_options=
Instance Method Details
#dump(object, options = {}) ⇒ Object
15 16 17 |
# File 'lib/multi_json/adapters/gson.rb', line 15 def dump(object, = {}) ::Gson::Encoder.new().encode(object) end |
#load(string, options = {}) ⇒ Object
11 12 13 |
# File 'lib/multi_json/adapters/gson.rb', line 11 def load(string, = {}) ::Gson::Decoder.new().decode(string) end |