file_name = 'json_file.json'
with open(file_name, 'a') as file_obj:
json.dump(msg, file_obj,indent=4)
加上indent = 4 可以直观的看到数据

file_name = 'json_file.json'
with open(file_name, 'a') as file_obj:
json.dump(msg, file_obj,indent=4)
加上indent = 4 可以直观的看到数据
本文标题:json 数据保存
本文链接:https://www.haomeiwen.com/subject/cuqleftx.html
网友评论