Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.