Created
June 13, 2010 11:49
-
-
Save themattharris/436600 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Thanks to Mark McBride for jsonator syntax | |
function jsoncurl { | |
curl -s $@ | jsonator | |
} | |
function jsontwurl { | |
twurl $@ | jsonator | |
} | |
function obtwurl { | |
twurl $@ | objenator | |
} | |
function jsonator { | |
ruby -rubygems -r pp -e 'require "json"; ARGF.each {|l| puts JSON.pretty_generate(JSON.parse(l))}' | |
} | |
function objenator { | |
ruby -rubygems -r pp -e 'require "json"; pp JSON.parse(ARGF.read)' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment