python 读写 json 文件

import json

with open("D:\研究生工作\dataset generation\file\obj_vec_dict.json") as f:
    obj_vec = json.load(f)

import json

with open("D:\研究生工作\dataset generation\file\obj_vec_dist.json", 'w') as f:
    json.dump(obj_vec_dist, f)
原文地址:https://www.cnblogs.com/xumaomao/p/11934609.html