Sha256: d5098c256aac6e3fa698566ac7bbfad85ee833d25f88092ff3e3b9615c34106f

Contents?: true

Size: 373 Bytes

Versions: 5

Compression:

Stored size: 373 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'

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

5 entries across 5 versions & 1 rubygems

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