Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Parses a JSON file containing multiple objects that are not contained in a single object.
require 'yajl'
def parse(json_filespec)
json_file = File.new(json_filespec, 'r')
parser = Yajl::Parser.new
records = []
parser.parse(json_file) do |x|
records << x
end
records
end
all_records_in_file = parse 'test.json'
puts "Found #{all_records_in_file.size} records."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.