Answers for "json.dumps unicode"

0

json.dumps unicode

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)
Posted by: Guest on July-27-2021

Browse Popular Code Answers by Language