本文共 195 字,大约阅读时间需要 1 分钟。
#-*- coding=utf-8 -*-devType = ["公司设备", "个人设备"]json.dumps( devType[0], ensure_ascii=True, encoding='utf-8' )
注意:这么转换后,如果直接在浏览器中返回json数据,可能还会是
\u516c\u53f8\u8bbe\u5907
但实际用javascript解析json,就发现是中文了
转载地址:http://fwzub.baihongyu.com/