九州体育网 - 十年信誉网站

关于作者

Discuss / Python / 交作业

交作业

Topic source

叫是先生

#1 Created at ...

obj = dict(name='小明', age=20) s = json.dumps(obj,ensure_ascii=False)

把ensure_ascii设置为false就能正确输出中文,这里ensuer_ascii是确保传输编码是ASCII格式吧.


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.