Skip to content

Instantly share code, notes, and snippets.

@andr3w321
Created November 17, 2012 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andr3w321/4098950 to your computer and use it in GitHub Desktop.
Save andr3w321/4098950 to your computer and use it in GitHub Desktop.
Rails JSON parse
require 'open-uri'
require 'json'
url = 'http://www.reddit.com/.json'
result = JSON.parse(open(url).read)
puts result['data']['children']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment