ensure_ascii
import json
dict1 = {'name': '时间', 'data': ['2023-04-13 05:00']}, {'name': '雨量mm/h', 'data': ['0.0000']}, {'name': '温度℃', 'data': ['15.0000']}, {'name': '湿度%rh', 'data': ['29']}
with open('result.json', 'w', encoding='utf-8') as json_file:
json_file.write(json.dumps(dict1, indent=4, ensure_ascii=False))
标签:dict1,name,Python,ascii,写入,json,file,data
From: https://www.cnblogs.com/jessecheng/p/17442914.html