Skip to content

Instantly share code, notes, and snippets.

@robcowie
Created April 8, 2010 12:39
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 robcowie/360044 to your computer and use it in GitHub Desktop.
Save robcowie/360044 to your computer and use it in GitHub Desktop.
Commandline alias to prettyprint json
alias ppjson='python -c "import simplejson, sys; print simplejson.dumps(simplejson.loads(sys.stdin.read()), indent=4)" | pygmentize -f console -l js'
@minimal
Copy link

minimal commented Apr 8, 2010

Nice one

@minimal
Copy link

minimal commented Apr 8, 2010

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