读 json 文件 with open(JsonPath, 'r') as f: ReadJsonContent = json.loads(f.read()) f.close() 写 json 文件 with open(JsonPath, 'w') as f: json.dump(JsonContent, f)