Created
April 8, 2010 12:39
-
-
Save robcowie/360044 to your computer and use it in GitHub Desktop.
Commandline alias to prettyprint json
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
alias ppjson='python -c "import simplejson, sys; print simplejson.dumps(simplejson.loads(sys.stdin.read()), indent=4)" | pygmentize -f console -l js' |
example usage (using sleepy.mongoose http://github.com/kchodorow/sleepy.mongoose) :
curl -X GET 'http://mongo:27080/publishing/requests/_find' | ppjson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice one