📌  相关文章
📜  如何在 python 中将数据添加到文件 json - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:01.158000             🧑  作者: Mango

代码示例1
import json

path="......"

with open(path) as f:
   obj = json.load(f) 

obj["data"].append({"name":"hayder zaeim"})

with open(path,"w+") as of:
   json.dump(obj,of)