Sha256: 0dee636e0ae8f66c5352e12036b132e8e591014dda2facb8ee15fa17c629932b

Contents?: true

Size: 359 Bytes

Versions: 5

Compression:

Stored size: 359 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'
require 'stringio'

unless string = ARGV[0]
  puts "\nUsage: ruby examples/from_string.rb '{\"foo\": 1145}'\n\n"
  exit(0)
end

hash = Yajl::Parser.parse(string)
puts hash.inspect

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yajl-ruby-0.8.3 examples/parsing/from_string.rb
yajl-ruby-0.8.2 examples/parsing/from_string.rb
yajl-ruby-0.8.1 examples/parsing/from_string.rb
yajl-ruby-0.8.0 examples/parsing/from_string.rb
yajl-ruby-0.7.9 examples/parsing/from_string.rb