Sha256: cf8e0b452a6f7e08bb53f3782d9fbea275100515c3d4fdc172d897c8c69d0e57

Contents?: true

Size: 355 Bytes

Versions: 13

Compression:

Stored size: 355 Bytes

Contents

$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../..')
$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 & 4 rubygems

Version Path
yajl-ruby-1.2.3 examples/parsing/from_file.rb
yajl-ruby-1.2.2 examples/parsing/from_file.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/yajl-ruby-1.2.1/examples/parsing/from_file.rb
yajl-ruby-1.2.1 examples/parsing/from_file.rb
yajl-ruby-1.2.0 examples/parsing/from_file.rb
yajl-ruby-zenjoy-1.1.0 examples/parsing/from_file.rb
yajl-ruby-maglev--1.1.0 examples/parsing/from_file.rb
yajl-ruby-1.1.0-x86-mswin32-60 examples/parsing/from_file.rb
yajl-ruby-1.1.0-x86-mingw32 examples/parsing/from_file.rb
yajl-ruby-1.1.0 examples/parsing/from_file.rb
yajl-ruby-1.0.0-x86-mswin32-60 examples/parsing/from_file.rb
yajl-ruby-1.0.0-x86-mingw32 examples/parsing/from_file.rb
yajl-ruby-1.0.0 examples/parsing/from_file.rb