Closed omrishiv closed 12 years ago
Which file?
Trying to run transform.rb on a JSON. It doesn't reach the JSON, it's complaining about the schema.js
On Apr 18, 2012, at 12:27 PM, Ilya Grigorik reply@reply.github.com wrote:
Which file?
Reply to this email directly or view it on GitHub: https://github.com/igrigorik/githubarchive.org/issues/7#issuecomment-5202644
You shouldn't need to run transform - that's internal tooling. Look at the example in the readme for parsing the data:
require 'open-uri'
require 'zlib'
require 'yajl'
gz = open('http://data.githubarchive.org/2012-03-11-12.json.gz')
js = Zlib::GzipReader.new(gz).read
Yajl::Parser.parse(js) do |event|
print event
end
I'm using it to convert to CSV. I guess I can just go that route
On Apr 18, 2012, at 12:31 PM, Ilya Grigorik reply@reply.github.com wrote:
You shouldn't need to run transform - that's internal tooling. Look at the example in the readme for parsing the data:
require 'open-uri' require 'zlib' require 'yajl' gz = open('http://data.githubarchive.org/2012-03-11-12.json.gz') js = Zlib::GzipReader.new(gz).read Yajl::Parser.parse(js) do |event| print event end
Reply to this email directly or view it on GitHub: https://github.com/igrigorik/githubarchive.org/issues/7#issuecomment-5202753
Hello, I was wondering if you had seen this before:
/Users/admin/.rvm/gems/ruby-1.9.2-p318/gems/yajl-ruby-1.1.0/lib/yajl.rb:36:in'
parse': lexical error: invalid string in json text. (Yajl::ParseError) [ { name: "repository_url", type: " (right here) ------^ from /Users/admin/.rvm/gems/ruby-1.9.2-p318/gems/yajl-ruby-1.1.0/lib/yajl.rb:36:in
parse' from argtest.rb:51:in `I get the same error if I'm using 1.8.7