# 让python的json.dumps输出中文

Source: https://blog.ferstar.org/posts/python-json-dumps-ensure-ascii-false/






python的json.dumps方法默认会输出成这种格式
`"\u535a\u5ba2\u56ed"`
要输出中文需要指定ensure_ascii参数为False，如下代码片段：
`json.dumps({'text':"中文"},ensure_ascii=False,indent=2)`

