Class: MultiJson::Engines::Yajl
- Inherits:
-
Object
- Object
- MultiJson::Engines::Yajl
- Defined in:
- lib/json-schema/lib/multi_json/multi_json/engines/yajl.rb
Overview
Use the Yajl-Ruby library to encode/decode.
Constant Summary collapse
- ParseError =
::Yajl::ParseError
Class Method Summary collapse
-
.decode(string, options = {}) ⇒ Object
:nodoc:.
-
.encode(object, options = {}) ⇒ Object
:nodoc:.
Class Method Details
.decode(string, options = {}) ⇒ Object
:nodoc:
9 10 11 |
# File 'lib/json-schema/lib/multi_json/multi_json/engines/yajl.rb', line 9 def self.decode(string, = {}) #:nodoc: ::Yajl::Parser.new(:symbolize_keys => [:symbolize_keys]).parse(string) end |
.encode(object, options = {}) ⇒ Object
:nodoc:
13 14 15 |
# File 'lib/json-schema/lib/multi_json/multi_json/engines/yajl.rb', line 13 def self.encode(object, = {}) #:nodoc: ::Yajl::Encoder.encode(object, ) end |