Sha256: 481943eb0c3ba23c60133ddb9a0b0ee9ea31c8d00d64450f63ca378ccdc8b79d

Contents?: true

Size: 250 Bytes

Versions: 12

Compression:

Stored size: 250 Bytes

Contents

# encoding: UTF-8

require 'rubygems'
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.new.parse(json)
puts hash.inspect

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
brianmario-yajl-ruby-0.5.0 examples/parsing/from_file.rb
brianmario-yajl-ruby-0.5.1 examples/parsing/from_file.rb
brianmario-yajl-ruby-0.5.2 examples/parsing/from_file.rb
brianmario-yajl-ruby-0.5.3 examples/parsing/from_file.rb
brianmario-yajl-ruby-0.5.4 examples/parsing/from_file.rb
brianmario-yajl-ruby-0.5.5 examples/parsing/from_file.rb
brianmario-yajl-ruby-0.5.6 examples/parsing/from_file.rb
brianmario-yajl-ruby-0.5.7 examples/parsing/from_file.rb
oortle-yajl-ruby-0.5.8 examples/parsing/from_file.rb
yajl-ruby-0.5.5 examples/parsing/from_file.rb
yajl-ruby-0.5.6 examples/parsing/from_file.rb
yajl-ruby-0.5.7 examples/parsing/from_file.rb