Module: Yajl

Defined in:
lib/yajl.rb,
lib/yajl/version.rb,
lib/yajl/http_stream.rb,
lib/yajl/gzip/stream_reader.rb,
lib/yajl/gzip/stream_writer.rb,
lib/yajl/bzip2/stream_reader.rb,
lib/yajl/bzip2/stream_writer.rb,
lib/yajl/deflate/stream_reader.rb,
lib/yajl/deflate/stream_writer.rb,
ext/yajl/yajl_ext.c

Overview

Yajl

Ruby bindings to the excellent Yajl (Yet Another JSON Parser) ANSI C library.

Defined Under Namespace

Modules: Bzip2, Deflate, Gzip Classes: EncodeError, Encoder, HttpStream, ParseError, Parser

Constant Summary collapse

VERSION =
'1.1.0'

Class Method Summary collapse

Class Method Details

.dump(obj, *args, &block) ⇒ Object

For compatibility, has the same signature of Yajl::Encoder.encode



21
22
23
# File 'lib/yajl.rb', line 21

def self.dump(obj, *args, &block)
  Encoder.encode(obj, args, &block)
end

.load(str_or_io, options = {}, read_bufsize = nil, &block) ⇒ Object

For compatibility, has the same signature of Yajl::Parser.parse



16
17
18
# File 'lib/yajl.rb', line 16

def self.load(str_or_io, options={}, read_bufsize=nil, &block)
  Parser.parse(str_or_io, options, read_bufsize, &block)
end