写
data = {'name': 'lin', 'email': 'xiaoqinglin2018@gmail.com'} with open('json_note.json', 'w') as f: # writing Json data json.dump(data, f,ensure_ascii=False,indent=4
)
读
with open('json_note', 'r') as f: # 解码json data = json.load(f)