mac jq for json format
mac jq
#1、安装 brew install jq #2、创建文件 echo '{"name": "Ruby"}' > ./test.json #3、查看 cat ./test.json | jq .
linux
1、使用jq命令 $ echo '{"uid":100120,"token":"1fa9fb8004b04f66b7da57393641eddc"}' | jq . 2、使用python -mjson.tool $ echo '{"msg": "ok", "data": {"list": [{"website": "letv", "url": "http://www.letv.com/ptv/pplay/75420/2.html", "video_id": "1594024"}], "cover": "http://img0.hao123.com/data/1_410778331e67b59a079ce4f802fcb26d"}, "ret": 0}' | python -mjson.tool