When I try to evaluate some json on a screen, I keep encountering errors with the message 'unexpected identifier'...
The problematic data that seems to be causing this issue is:
"itemDescription":"STANDARD \"B\" RED BOX",
To address this, I have tried using the following java code snippet to handle double quotes:
itemDescription = itemDescription.replaceAll("\\r|\\n", "");
itemDescription = itemDescription.replaceAll("\"", "\\\\\"");
itemDescription = itemDescription.replaceAll("'", "'");
However, despite these efforts, the issue persists. Interestingly, if I remove the double quotes altogether, the errors vanish.
In contrast, item descriptions like "itemDescription":"STANDARD 16\" RED BOX" seem to process without any issues...
Any insights or suggestions would be greatly appreciated! Thanks!