python 命令行读取json文件
Posted F
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 命令行读取json文件相关的知识,希望对你有一定的参考价值。
macname@bogon testenv3.7 % cat file.json { "code": 200, "msg": "请求成功", "data": { "username": "abc", "mobile": "18611751121" }, "task":[{ "username": "abc1", "mobile": "18611751121" }, { "username": "abc2", "mobile": "18611751121" }] } macname@bogon testenv3.7 % macname@bogon testenv3.7 % python3 -m json.tool file.json { "code": 200, "msg": "u8bf7u6c42u6210u529f", "data": { "username": "abc", "mobile": "18611751121" }, "task": [ { "username": "abc1", "mobile": "18611751121" }, { "username": "abc2", "mobile": "18611751121" } ] }
以上是关于python 命令行读取json文件的主要内容,如果未能解决你的问题,请参考以下文章