使用json.dumps(user, ensure_ascii=False)
user = {"id": 101, "name": "张三"}
print(json.dumps(user))
{"id": 101, "name": "\u5f20\u4e09"}
print(json.dumps(user, ensure_ascii=False))
{"id": 101, "name": "张三"}
使用json.dumps(user, ensure_ascii=False)
user = {"id": 101, "name": "张三"}
print(json.dumps(user))
{"id": 101, "name": "\u5f20\u4e09"}
print(json.dumps(user, ensure_ascii=False))
{"id": 101, "name": "张三"}