Simple console script to look at .json file
Opens a raw .json file and then prints it in your terminal with spaces and indentations in an easy-to-read way
Example of script launch on Linux, Python 3.5:
$ python pprint_json.py <path to file>
Raw JSON file:
{"employees":[{ "firstName":"John", "lastName":"Doe" },{ "firstName":"Anna", "lastName":"Smith" }]}
Output:
{
"employees": [
{
"firstName": "John",
"lastName": "Doe"
},
{
"firstName": "Anna",
"lastName": "Smith"
}
]
}
The code is written for educational purposes. Training course for web-developers - DEVMAN.org