Easy CLI JSON Formatting
binarysludge.com
binarysludge.com
(This was enough of a problem for me that I wrote a simple curl replacement in Python so I could have pretty-printed JSON or XML and response headers, or send the response directly to a Python REPL console as an object: https://github.com/cobralibre/hotpotato )
curl -v -s "$url" | python -mjson.tool
curl -D /dev/stderr -s "$url" | python -mjson.toolReally recommend setting up his dotfiles. After you back up your dotfiles, you can install his (which overwrites yours) just by writing
git clone https://github.com/paulirish/dotfiles.git && cd dotfiles && ./sync.shalias jsonpp='ruby -r json -e '\''puts JSON.pretty_generate(JSON.parse(STDIN.read))'\'''
alias md5pass='dd if=/dev/random bs=100 count=1 2>/dev/null | md5'
gem install jazor coderay
curl $SOMETHING | jazor | coderay -json