Sample code (in a REPL):
import json
json_string = json.dumps("ברי צקלה")
print(json_string)
Output:
"\u05d1\u05e8\u05d9 \u05e6\u05e7\u05dc\u05d4"
The problem: it's not human readable. My (smart) users want to verify or even edit text files with JSON dumps (and I’d rather not use XML).
Is there a way to serialize objects into UTF-8 JSON strings (instead of \uXXXX
)?