Pretty Printing JSON With Python
Oh Python, you make a developer’s life so easy.
I executed a “python manage.py datadump > db.json” which sent the contents of my Django-created database out to a file. However, I realized that the results were all on one line and I wanted to go through the output to create some test data. A quick “more db.json | python -mjson.tool > db-pretty.json” command transformed the whole thing into a more readable format.
This is just one of many examples of why I love Python programming.