Python3 json.dumps中文乱码解决方法

1.python文件开头导入

from __future__ import unicode_literals
import json
string = '今天'
print(json.dumps(str,ensure_ascii=False))

参考资料:https://blog.csdn.net/qq_35277505/article/details/78953876

猜你喜欢

转载自blog.csdn.net/Cuixinyang19_/article/details/83508447