Before the command line to print JSON is all cat, and then copy the results to the editor supporting JSON resolution, very tortuous.
After a short search, an article was found on the StackOverflow. The highest support for the answer requires python2.6+ support, but the server version of 2.4, the impact of the upgrade is unpredictable, and then give up.
Continue to see the following answer, there is a small tool called JQ looks good, download the test can really meet the requirements.
#cat Food.json | JQ '. '
So you can get a well-formed result
Give us a detailed introduction to the next JQ bar
JQ Official website: http://stedolan.github.io/jq/
After downloading binary can be directly called, detailed installation see: http://stedolan.github.io/jq/download/
Simple way to use:
1,json File Friendly display
Copy Code code as follows:
Cat Jsonfile | Path_to_jq/jq.
2, get the value of a key in JSON
Copy Code code as follows:
Cat Jsonfile | PATH_TO_JQ/JQ ". Key"
More operations, see: http://stedolan.github.io/jq/manual/