Skip to content Skip to sidebar Skip to footer

Unicode Values In Strings Are Escaped When Dumping To Json In Python

For example: >>> print json.dumps('růže') 'r\u016f\u017ee' (Of course, in the real program it's not just a single string, and it also appears like this in the file, whe

Solution 1:

Pass the ensure_ascii=False argument to json.dumps:

>>> print json.dumps('růže', ensure_ascii=False)
"růže"

Post a Comment for "Unicode Values In Strings Are Escaped When Dumping To Json In Python"