Class: MultiJson::Adapters::Oj
- Inherits:
-
Object
- Object
- MultiJson::Adapters::Oj
- Defined in:
- lib/multi_json/adapters/oj.rb
Overview
Use the Oj library to dump/load.
Constant Summary collapse
- ParseError =
SyntaxError
Class Method Summary collapse
-
.dump(object, options = {}) ⇒ Object
:nodoc:.
-
.load(string, options = {}) ⇒ Object
:nodoc:.
Class Method Details
.dump(object, options = {}) ⇒ Object
:nodoc:
16 17 18 19 |
# File 'lib/multi_json/adapters/oj.rb', line 16 def self.dump(object, ={}) #:nodoc: .merge!(:indent => 2) if [:pretty] || ['pretty'] ::Oj.dump(object, ) end |
.load(string, options = {}) ⇒ Object
:nodoc:
11 12 13 14 |
# File 'lib/multi_json/adapters/oj.rb', line 11 def self.load(string, ={}) #:nodoc: .merge!(:symbol_keys => [:symbolize_keys] || ['symbolize_keys']) ::Oj.load(string, ) end |