It feels like a a very basic question and I've already read through the docs and answers, that suggest my code should be working. This may really be a duplicate and I missed something, please, drop a link as I've already spent a couple of hours on this and it feels silly. Thank you in advance.
Python 3.6 code:
import json
print( json.loads( '{"text": \"\\u0444\\u044b\\u0432\\u0430\"}' ) )
Produces the following error:
Traceback (most recent call last):
File "test2.py", line 28, in <module>
print( json.loads( '{"txt": \"\\u0444\\u044b\\u0432\\u0430\"}' ) )
UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-12: ordinal not in range(128)
I had an impression that I can do
jsn = json.dumps( my_dict )
# and later call
json.loads( jsn )
And I will get back my original dict, but this doesn't work for unicode characters.
Can I convert a string containing unicode characters back to python dict with json.loads ? Please, provide a minimum working code for my example.