Skip to content

Instantly share code, notes, and snippets.

@hackervera
Created August 5, 2010 07:42
Show Gist options
  • Save hackervera/509396 to your computer and use it in GitHub Desktop.
Save hackervera/509396 to your computer and use it in GitHub Desktop.
json url formatter
require 'rubygems'
require 'json'
require 'ap'
url = ARGV[0]
puts url
res = %x[curl "#{url}"]
puts JSON.pretty_generate(JSON.parse(res))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment