Sha256: a4d98c8bfc63d6da74051c1ba5ddaedbc043a9a89553dc36e8a5e353e5fc76aa

Contents?: true

Size: 302 Bytes

Versions: 13

Compression:

Stored size: 302 Bytes

Contents

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

require 'yajl'

unless file = ARGV[0]
  puts "\nUsage: ruby examples/from_file.rb benchmark/subjects/item.json\n\n"
  exit(0)
end

json = File.new(file, 'r')

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

Version data entries

13 entries across 13 versions & 2 rubygems

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