Created
December 4, 2008 19:50
-
-
Save jnunemaker/32043 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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