Hello
I'm trying to generate a JSON file with the JSON.Stringify, but, the quotes that are generated by my code o are not compliant with the json format. It's generating smart quotes to the left like (“object”:“pair”) instead of ("object":"pair")
Does anybody knows how to solve this? I've searched dozens of articles but none was clear or worked
So far I've tried this pieces of code
//myObject is a string
myObject = myObject.replace('”','\u0022');
myObject = myObject.replace('“','\u0022');
myObject = myObject.replace('”','\"');
myObject = myObject.replace('“','\"');
myObject = myObject.replace('”','"');
myObject = myObject.replace('“','"');
myObject = myObject.replace('\u201C', '\u0022');
myObject = myObject.replace('\u201D', '\u0022');
But none seems to work
Glad for all the help I can have on this