Skip to content

Instantly share code, notes, and snippets.

@rtanglao
Created September 12, 2010 05:23
Show Gist options
  • Select an option

  • Save rtanglao/575869 to your computer and use it in GitHub Desktop.

Select an option

Save rtanglao/575869 to your computer and use it in GitHub Desktop.
unserialize JSON of gastown flickr photos so you can do cool stuff with them
#!/usr/bin/env ruby
require 'json'
require 'net/http'
require 'pp'
require 'Time'
require 'uri'
require 'parseconfig'
flickr_data=[]
i = 0
ARGF.each_line do |line|
serializedJSON = line
flickr_data_page = JSON.parse(serializedJSON)
pp flickr_data_page
flickr_data[i] = flickr_data_page
i += 1
end
@rtanglao
Copy link
Author

requires this 4.3 MB file to be in the same directory:
http://dl.dropbox.com/u/361757/gastownphotos.stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment