Module: MultiJson::Adapters::Yajl

Extended by:
Yajl
Included in:
Yajl
Defined in:
lib/vendor/multi_json/lib/multi_json/adapters/yajl.rb

Overview

Use the Yajl-Ruby library to dump/load.

Constant Summary collapse

ParseError =
::Yajl::ParseError

Instance Method Summary collapse

Instance Method Details

#dump(object, options = {}) ⇒ Object

:nodoc:


15
16
17
# File 'lib/vendor/multi_json/lib/multi_json/adapters/yajl.rb', line 15

def dump(object, options={}) #:nodoc:
  ::Yajl::Encoder.encode(object, options)
end

#load(string, options = {}) ⇒ Object

:nodoc:


11
12
13
# File 'lib/vendor/multi_json/lib/multi_json/adapters/yajl.rb', line 11

def load(string, options={}) #:nodoc:
  ::Yajl::Parser.new(:symbolize_keys => options[:symbolize_keys]).parse(string)
end