xxxxxxxxxx
open(jsonfile , "w", encoding="utf8").write(json.dumps(file,indent=4, ensure_ascii=False))
xxxxxxxxxx
>>> json_string = json.dumps("ברי צקלה", ensure_ascii=False).encode('utf8')
>>> json_string
b'"\xd7\x91\xd7\xa8\xd7\x99 \xd7\xa6\xd7\xa7\xd7\x9c\xd7\x94"'
>>> print(json_string.decode())
"ברי צקלה"
xxxxxxxxxx
with open('speechbase.json', 'w') as jsonfile:
json.dump(DATA, jsonfile, indent = 4)