Today I encountered this JSONItem.Load error using a client’s sample data:
“lexical error: invalid bytes in UTF8 string”
After investigating, the culprit is a “CA” hex sequence in the UTF8 string. I’m not sure what this character is supposed to represent. Is anyone familiar with this?
The thing is that calling JSONItem.Value to encode the string with this bad character works without complaint, but attempting to load the resultant JSONItem.ToString raises the exception.
I can use ReplaceAllB(DecodeHex(“CA”), “”) to strip it but should I? Should I convert it to something else? Now, I’m concerned about what other rogue characters are out there waiting to wreak havoc on my JSON?
I am finding the new JSONItem to be quite finicky and I’m running into new traps all the time,