Python 保存为json,并按json文件格式换行,中文不乱码

with open('file.json','w',encoding='utf-8') as f:
    f.write(json.dumps(port_latlng,ensure_ascii=False,indent=1))

猜你喜欢

转载自blog.csdn.net/qq_43523725/article/details/104770458