Class: MultiJson::Engines::Oj
- Inherits:
-
Object
- Object
- MultiJson::Engines::Oj
- Defined in:
- lib/multi_json/engines/oj.rb
Overview
Use the Oj library to encode/decode.
Constant Summary collapse
- ParseError =
SyntaxError
Class Method Summary collapse
-
.decode(string, options = {}) ⇒ Object
:nodoc:.
-
.encode(object, options = {}) ⇒ Object
:nodoc:.
Class Method Details
.decode(string, options = {}) ⇒ Object
:nodoc:
11 12 13 14 15 |
# File 'lib/multi_json/engines/oj.rb', line 11 def self.decode(string, = {}) #:nodoc: opts = {} opts[:symbol_keys] = [:symbolize_keys] ::Oj.load(string, opts) end |
.encode(object, options = {}) ⇒ Object
:nodoc:
17 18 19 |
# File 'lib/multi_json/engines/oj.rb', line 17 def self.encode(object, = {}) #:nodoc: ::Oj.dump(object, ) end |