I have a bit of JSON coming from a mock that needs to de deserialized into an object. The JSON itself is perfectly valid. It has been validated by multiple services, and they all say it looks legit.
However, I consequently get
System.JSONException: Unexpected character ('\' (code 92)): was expecting double-quote to start field name at [line:1, column:3]
Which is odd, because there is not even a single backslash character in the file.
Then, when I fold the JSON into 'compact' form, removing all spaces, tabs, indentation etc, it suddenly works.
Any clues? Anybody had something similar before?