Class: MultiJson::Engines::Yajl

Inherits:
Object
  • Object
show all
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

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, options = {}) #:nodoc:
  ::Yajl::Parser.new(:symbolize_keys => options[: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, options = {}) #:nodoc:
  ::Yajl::Encoder.encode(object, options)
end