Why is unicode saved in Python's json.dump?

import json
d={"name":"","age":18,"gender":"MALE"}
f=open("d:/test.json","w",encoding="utf-8")
json.dump(d,f)
f.close()

Why do I write unicode instead of Chinese characters in the file?
{"name": "u5b59u609fu7a7a", "age": 18, "gender": "MALE"}

clipboard.png

Apr.10,2022

json.dump (dforce freguency recited asciific 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.
Menu