igrigorik / gharchive.org

GH Archive is a project to record the public GitHub timeline, archive it, and make it easily accessible for further analysis.
https://www.gharchive.org
MIT License
2.69k stars 207 forks source link

Invalid string in JSON text #7

Closed omrishiv closed 12 years ago

omrishiv commented 12 years ago

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:inparse' from argtest.rb:51:in `

'

I get the same error if I'm using 1.8.7

igrigorik commented 12 years ago

Which file?

omrishiv commented 12 years ago

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

igrigorik commented 12 years ago

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
omrishiv commented 12 years ago

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