Sha256: 07293533960d95bc8fea47e83b635c9113300ab655501d6f4dc52d21ae852856

Contents?: true

Size: 288 Bytes

Versions: 13

Compression:

Stored size: 288 Bytes

Contents

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

13 entries across 13 versions & 2 rubygems

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