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)