code
#!/usr/bin/python
# encoding=utf-8
import json
data = [{"a": "中文"}]
print json.dumps(data).decode("unicode-escape")
输出
[{"a": "中文"}]
#!/usr/bin/python
# encoding=utf-8
import json
data = [{"a": "中文"}]
print json.dumps(data).decode("unicode-escape")
[{"a": "中文"}]
转载于:https://www.cnblogs.com/xigui/p/6539950.html