Fast Diagnosis Checklist
- Inspect raw response body before calling
JSON.parseorresponse.json(). - Confirm content-type is
application/json. - Run payload through JSON Validator.
- Reformat payload in JSON Formatter to locate breakpoints.
Common Root Causes
- Server returned HTML error page (
<token at position 0). - Trailing commas or missing quotes in JSON body.
- Double-encoded escaped JSON string not decoded first.
- Unexpected BOM or invisible characters at payload start.
Recommended Workflow
Validate syntax first, then compare expected vs actual response shape using JSON Diff. If the source is CSV/XML conversion output, normalize via conversion guides before parsing.