Skip to content

Instantly share code, notes, and snippets.

@jnunemaker
Created December 4, 2008 19:50
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 jnunemaker/32043 to your computer and use it in GitHub Desktop.
Save jnunemaker/32043 to your computer and use it in GitHub Desktop.
require 'rubygems'
gem 'httparty', '0.2.0'
require 'httparty'
class JSONPretty
include HTTParty
def self.generate(url)
JSON.pretty_generate(get(url, :format => :json))
end
end
puts JSONPretty.generate(ARGV[0])
# Example Use:
# ruby jsonpretty http://twitter.com/statuses/public_timeline.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment