ensure_ascii False 中文显示 非 ASCII 字符转义

如果 ensure_ascii 是 true (即默认值),输出保证将所有输入的非 ASCII 字符转义。如果 ensure_ascii 是 false,这些字符会原样输出。

If ensure_ascii is true (the default), the output is guaranteed to have all incoming non-ASCII characters escaped. If ensure_ascii is false, these characters will be output as-is.

 

json — JSON encoder and decoder — Python 3.12.4 documentation https://docs.python.org/3/library/json.html

 

posted @ 2024-07-12 19:12  papering  阅读(11)  评论(0编辑  收藏  举报