I have characters \u002d, \u2019, u\2022, \u25ba, \u2013 etc, coming in my data.
I have to do json.loads(data)
I tried doing
data1 = data.encode('utf-8')
json.loads(data1)
I still get an error.
Also tried the below but ended up in an error
b1 = data.encode('ascii', 'ignore')
b2 = json.loads(b1)
It works if I replace the characters in my data, like '\u002d' to '-', but I do not know what other characters might creep in. So I am looking for a solution which would encode these characters