通过help(json.dumps),对于参数ensure_ascii解释:
If ensure_ascii is false, then the return value can contain non-ASCII characters if they appear in strings contained in obj. Otherwise, all such characters are escaped in JSON strings.
ensure_ascii
obj
unicode编码包含ascii编码 没有设置ensure_ascii = False的话就默认将汉字转为unicode编码
Sign in to make a reply
青铜神裔
通过help(json.dumps),对于参数ensure_ascii解释:
unicode编码包含ascii编码 没有设置ensure_ascii = False的话就默认将汉字转为unicode编码