import json
with open("replayScript.json", "r",encoding='utf-8') as jsonFile:
data = json.load(jsonFile)
tmp = data["location"]
data["location"] = "NewPath"
with open("replayScript.json", "w",encoding='utf-8') as jsonFile:
json.dump(data, jsonFile,indent=4,ensure_ascii=False)
修改json文件内容
最新推荐文章于 2024-05-24 15:20:29 发布