Class: MultiJSON::Adapters::Oj Private
- Inherits:
-
MultiJSON::Adapter
- Object
- MultiJSON::Adapter
- MultiJSON::Adapters::Oj
- Includes:
- OjCommon
- Defined in:
- lib/multi_json/adapters/oj.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Use the Oj library to dump/load.
Defined Under Namespace
Classes: ParseError
Constant Summary
Constants included from Options
Instance Method Summary collapse
-
#dump(object, options = {}) ⇒ String
private
Serialize a Ruby object to JSON.
-
#load(string, options = {}) ⇒ Object
private
Parse a JSON string into a Ruby object.
Methods inherited from MultiJSON::Adapter
default_dump_options, default_generate_options, default_load_options, default_parse_options, defaults, dump, load
Methods included from Options
#default_dump_options, #default_generate_options, #default_load_options, #default_parse_options, #dump_options, #dump_options=, #generate_options, #generate_options=, #load_options, #load_options=, #parse_options, #parse_options=
Instance Method Details
#dump(object, options = {}) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Serialize a Ruby object to JSON
66 67 68 |
# File 'lib/multi_json/adapters/oj.rb', line 66 def dump(object, = {}) ::Oj.dump(object, ()) end |
#load(string, options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Parse a JSON string into a Ruby object
53 54 55 |
# File 'lib/multi_json/adapters/oj.rb', line 53 def load(string, = {}) ::Oj.load(string, ()) end |