Class: MultiJson::Adapters::Yajl

Inherits:
Object
  • Object
show all
Defined in:
lib/multi_json/adapters/yajl.rb

Overview

Use the Yajl-Ruby library to dump/load.

Constant Summary collapse

ParseError =
::Yajl::ParseError

Class Method Summary collapse

Class Method Details

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

:nodoc:



13
14
15
# File 'lib/multi_json/adapters/yajl.rb', line 13

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

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

:nodoc:



9
10
11
# File 'lib/multi_json/adapters/yajl.rb', line 9

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