Salesforce System.JSONException: Unexpected character (‘ ‘ (code 160))

Salesforce System.JSONException: Unexpected character (‘ ‘ (code 160))

Exception:

System.JSONException: Unexpected character (' ' (code 160)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

Resolution:

This JSON Exception occurs when the JSON String that is getting de-serialize contains invalid characters. If the JSON payload is encoded, try to decode before processing it. Also, use a simple text editing app to check the JSON content in the payload used.

Leave a Reply