修改json文件后编码格式不正确

json文件读取后并修改发现编码格式出现问题

需要在写入的时候加上ensure_ascii=False参数

with open("./CaseData/BMDD.json", 'w', encoding='UTF-8') as f:
    json.dump(case_info, f, ensure_ascii=False)
原文地址:https://www.cnblogs.com/gcgc/p/12705601.html