Is there a (Unix) shell script to format JSON in human-readable form?
Basically, I want it to transform the following:
{ \"foo\": \"lorem\", \"bar\":
I combine Python's json.tool with pygmentize:
echo '{"foo": "bar"}' | python -m json.tool | pygmentize -g
There are some alternatives to pygmentize which are listed in my this answer.
Here is a live demo: