simple JSON pretty printer that you can easily copy paste

Simple JSON pretty printer that you can easily copy paste. Useful when you need to read a big JSON output and you are on a remote machine on which you can not install a lot.


python -c 'import sys; import json; import pprint; pprint.pprint(json.loads(sys.stdin.read()))'

Usage:

somecommand_that_generates_json_output | python -c 'import sys; import json; import pprint; pprint.pprint(json.loads(sys.stdin.read()))'

No comments:

Post a Comment