Python 读写json文件

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)

你可能感兴趣的:(Python,python,json,开发语言)