📜  json.dumps unicode - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:33.245000             🧑  作者: Mango

代码示例1
import codecs
import json

with codecs.open('your_file.txt', 'w', encoding='utf-8') as f:
    json.dump({"message":"xin chào việt nam"}, f, ensure_ascii=False)