Pretty-print JSON with Python's json.tool

Pretty-print a JSON file using Python (v2.5+)'s built-in json.tool module:

cat MYFILE.json | python -m json.tool
Published 15 Feb 2014
Tagged python, json, cli and one-liner.

 

This page was generated at 4:16 PM on 26 Feb 2018.
Copyright © 1999 - 2018 Rodney Waldhoff.