Below is the test program, including a Chinese character:
# -*- coding: utf-8 -*-
import json
j = {"d":"中", "e":"a"}
json = json.dumps(j, encoding="utf-8")
print json
Below is the result, look the json.dumps convert the utf-8 to the original numbers!
{"e": "a", "d": "u4e2d"}
Why this is broken? Or anything I am wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…