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
- ParseError =
if defined?(::Oj::ParseError) ::Oj::ParseError else SyntaxError end
Class Method Summary (collapse)
-
+ (Object) dump(object, options = {})
:nodoc:.
-
+ (Object) load(string, options = {})
:nodoc:.
Class Method Details
+ (Object) dump(object, options = {})
:nodoc:
20 21 22 23 |
# File 'lib/multi_json/adapters/oj.rb', line 20 def self.dump(object, ={}) #:nodoc: .merge!(:indent => 2) if [:pretty] ::Oj.dump(object, ) end |
+ (Object) load(string, options = {})
:nodoc:
15 16 17 18 |
# File 'lib/multi_json/adapters/oj.rb', line 15 def self.load(string, ={}) #:nodoc: .merge!(:symbol_keys => [:symbolize_keys]) ::Oj.load(string, ) end |