Sha256: a7d6916587512f03864a8f710ee074e0c00c40f44c812f9f867205f02d1446ea

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

# encoding: UTF-8
require 'yajl_ext'

# = Extras
# We're not going to load these auotmatically, because you might not need them ;)
#
# require 'yajl/http_stream.rb' unless defined?(Yajl::HttpStream)
# require 'yajl/gzip.rb' unless defined?(Yajl::Gzip)
# require 'yajl/deflate.rb' unless defined?(Yajl::Deflate)
# require 'yajl/bzip2.rb' unless defined?(Yajl::Bzip2)

# = Yajl
#
# Ruby bindings to the excellent Yajl (Yet Another JSON Parser) ANSI C library.
module Yajl
  VERSION = "0.4.6"
  
  # == Yajl::Chunked
  #
  # This module contains methods for parsing JSON in chunks.
  # The use case here is that the caller may not be able to get access to the IO to which
  # JSON content is being received. Rendering Yajl::Stream dead to them.
  #
  # With the methods in this module, the caller will be able to pass in chunks of JSON content
  # until a full object has been parsed from said content.
  #
  # In order for this process to work correctly, the caller needs to specify a callback which
  # is passed the constructed object. The only requirement currently of this callback is that
  # it respond to #call and accept a single parameter (the object that was created from parsing).
  module Chunked; end
  
  # == Yajl::Stream
  #
  # This module contains methods for parsing JSON directly from an IO object.
  #
  # The only basic requirment currently is that the IO object respond to #read(len) and eof?
  #
  # The IO is parsed until a complete JSON object has been read and a ruby object will be returned.
  module Stream; end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brianmario-yajl-ruby-0.4.6 lib/yajl.rb