Sha256: 64a39f0bb9bae453be65fa80a3761a6cfe2741e2d1e04e74b50d82408f996ae0

Contents?: true

Size: 285 Bytes

Versions: 13

Compression:

Stored size: 285 Bytes

Contents

# encoding: UTF-8
$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

13 entries across 13 versions & 2 rubygems

Version Path
yajl-ruby-0.7.8 examples/encoding/to_an_io.rb
yajl-ruby-0.7.7 examples/encoding/to_an_io.rb
benofsky-yajl-ruby-0.7.7 examples/encoding/to_an_io.rb
benofsky-yajl-ruby-0.7.6 examples/encoding/to_an_io.rb
yajl-ruby-0.7.6 examples/encoding/to_an_io.rb
yajl-ruby-0.7.5 examples/encoding/to_an_io.rb
yajl-ruby-0.7.4 examples/encoding/to_an_io.rb
yajl-ruby-0.7.3 examples/encoding/to_an_io.rb
yajl-ruby-0.7.2 examples/encoding/to_an_io.rb
yajl-ruby-0.7.1 examples/encoding/to_an_io.rb
yajl-ruby-0.7.0 examples/encoding/to_an_io.rb
yajl-ruby-0.6.9 examples/encoding/to_an_io.rb
yajl-ruby-0.6.8 examples/encoding/to_an_io.rb