Class: Yajl::Bzip2::StreamWriter

Inherits:
Bzip2::Writer
  • Object
show all
Defined in:
lib/yajl/bzip2/stream_writer.rb

Overview

A wrapper around the Bzip2::Writer class for easier JSON stream encoding

Class Method Summary (collapse)

Class Method Details

+ (Object) encode(obj, io)

A helper method for encoding to a bzip2-compressed stream

Look up Yajl::Encoder#encode for parameter documentation



10
11
12
# File 'lib/yajl/bzip2/stream_writer.rb', line 10

def self.encode(obj, io)
  Yajl::Encoder.new.encode(obj, new(io))
end