处理json

import json

1. 读取json文件

import json
with open("filepath","rb+") as jsonfile:
     json.loads(jsonfile.read())

2. 生成json文件

import json
with open("file_name", "w") as f:
    json.dump(json_data, f)
原文地址:https://www.cnblogs.com/zz27zz/p/9777779.html