Useful Bits of Information
Useful Tips and Tricks for power users
Tuesday, September 17, 2013
Formatting JSON files
Oftentimes you have JSON files which need to be formatted and checked for validity. You can use the following ways of going about it.
1. Using Python
cat file.json | python -mjson.tool > newfile.json
2. Uing jsonlint
Install jsonlint using 'sudo apt-get install python-demjson'
Then use the command
jsonlint -fv file.json > newfile.json
Newer Post
Older Post
Home