I am trying to write and retrive a JSON with Special characters to REDIS but the special characters are getting converted
The special character Mój is getting converted to Mój and Můj is converted to Můj
from rejson import Client, Path
import json
rj = Client(host='localhost', port=6360, decode_responses=True)
app_details2 = {
"applist": [
{
"appname": "Mój",
"country": "PL"
},
{
"appname": "Můj",
"country": "CZ"
}
],
"lasttimestamp": "2021-01-03 12:58:26",
"loadtype":"F"
}
rj.jsonset('app_details', Path.rootPath(),app_details)
valo = rj.jsonget('app_details',Path('.applist'))
print(type(valo[0]))
print(valo)
for i in valo:
app = i["appname"]
country = i["country"]
print(app)
The issue was resolved by adding a extra parameter to the JSONGET
This solved the problem and data is getting fetched properly