Sha256: 0f1ef7b99643ba4d8810db699fca856f9b2cc5dba73aae64619429aa2e211708

Contents?: true

Size: 356 Bytes

Versions: 5

Compression:

Stored size: 356 Bytes

Contents

# encoding: UTF-8
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../..')
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib')

require 'yajl'

obj = {
  :a_test => "of encoding directly to an IO stream",
  :which_will => "simply return a string when finished",
  :as_easy_as => 123
}

Yajl::Encoder.encode(obj, STDOUT)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yajl-ruby-0.8.3 examples/encoding/to_an_io.rb
yajl-ruby-0.8.2 examples/encoding/to_an_io.rb
yajl-ruby-0.8.1 examples/encoding/to_an_io.rb
yajl-ruby-0.8.0 examples/encoding/to_an_io.rb
yajl-ruby-0.7.9 examples/encoding/to_an_io.rb