使用 curl 获取 JSON 文件时,或者使用 cat 等命令显示JSON文件时,如果想要优化一下 JSON 文件的显示,可以使用 python -mjson.tool

如下:


curl -s http://search.twitter.com/search.json\?q\=blue%20angels | python -mjson.tool