sample code:
>>> import json
>>> json_string = json.dumps(\"ברי צקלה\")
>>> print json_string
\"\\u05d1\\u05e8\\u05d9 \\u05e6\\u05
If you are loading JSON string from a file & file contents arabic texts. Then this will work.
{
"key1" : "لمستخدمين",
"key2" : "إضافة مستخدم"
}
with open(arabic.json, encoding='utf-8') as f:
# deserialises it
json_data = json.load(f)
f.close()
# json formatted string
json_data2 = json.dumps(json_data, ensure_ascii = False)
# If have to get the JSON index in Django Template file, then simply decode the encoded string.
json.JSONDecoder().decode(json_data2)
done! Now we can get the results as JSON index with arabic value.