Quick answer

Responses can be truncated, contain BOM or extra bytes, or mix JSON with text.

API Malformed Response

Responses can be truncated, contain BOM or extra bytes, or mix JSON with text. Parsers need a single, complete JSON value.

Common causes

How to fix

FAQ

What is a BOM in JSON?
Byte Order Mark (e.g. EF BB BF) at the start of a file. Some parsers reject it; strip it before parsing.
Can response have multiple JSON objects?
Standard JSON is one value per document. NDJSON (newline-delimited) is one JSON per line; parse line by line.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical