In python, If I have a JSON object obj
, then I can
print json.dumps(obj, sort_keys=True, indent=4)
in order to get a pretty printout of the object. Is it possible to prettify the output even further: add some colors in particular? Something like the result of [1]
cat foo.json | jq '.'
[1] jq
the JSON Swiss Army toolbox: http://stedolan.github.io/jq/