with open('result.json', 'r', encoding='utf-8') as f:
result_str = f.read()
result_dic = json.loads(result_str)
f,read 读取的类型为str
使用json.loads(str),将json 转 dict
with open('result.json', 'r', encoding='utf-8') as f:
result_str = f.read()
result_dic = json.loads(result_str)
f,read 读取的类型为str
使用json.loads(str),将json 转 dict