Answer the question
In order to leave comments, you need to log in
How to save JSON with Cyrillic so that it is readable?
Greetings.
There is a dictionary and it needs to be converted to JSON so that it is readable. I do it like this:
nmbrs =
{
"one": "Один",
"two": "Два",
"three": "Три",
"four": "Четыре"
}
print(json.dumps(nmbrs))
# получается вот это
# {"one": "\u041e\u0434\u0438\u043d", "two": "\u0414\u0432\u0430", "three": "\u0422\u0440\u0438", "four": "\u0427\u0435\u0442\u044b\u0440\u0435"}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question