python将dict中的unicode打印成中文
import json
a = {u'content':
{u'address_detail': {u'province': u'u5409u6797u7701', u'city':
u'u957fu6625u5e02', u'street_number': u'', u'district': u'',
u'street': u'', u'city_code': 53}, u'point': {u'y': u'43.89833761',
u'x': u'125.31364243'}, u'address':
u'u5409u6797u7701u957fu6625u5e02'}, u'status': 0, u'address':
u'CN|u5409u6797|u957fu6625|None|CERNET|0|0'}
print json.dumps(a).decode('unicode-escape')
输出:
{"content": {"address_detail": {"province": "吉林省", "city":
"长春市", "street_number": "", "district": "", "street": "", "city_code":
53}, "address": "吉林省长春市", "point": {"y": "43.89833761", "x":
"125.31364243"}}, "status": 0, "address": "CN|吉林|长春|None|CERNET|0|0"}