Step-by-Step
- Capture raw response body and HTTP status.
- Run syntax checks in JSON Validator.
- Beautify with JSON Formatter.
- Compare to baseline using JSON Diff.
- Generate typed models if needed (TS, C#).
Common Debug Outcomes
- Unexpected token due to non-JSON response body.
- Type mismatch caused by upstream serialization changes.
- Field removal/addition breaking strict consumers.
Operational Tips
- Log the raw response before parsing in production.
- Store a known-good payload for diff-based diagnostics.
- Fail fast on invalid JSON instead of silently ignoring it.
For repeated incidents, publish this flow in team runbooks and CI validation checks.
FAQ
Should I validate JSON in production?
Validate during debugging and in staging; in production, validate only on suspicious or high-risk inputs.
What if my API returns JSON strings instead of objects?
Decode with String to JSON and then parse as normal.