Rule reference

openrtb.payload.invalid_json

errorRequest or response

What it means

The payload could not be parsed as JSON at all: a truncated body, a stray trailing comma, single quotes, unescaped control characters, or a non-JSON body such as HTML from an error page. Validation stops here because no field-level rule can run against a document that does not parse.

Why it matters

Every bidder rejects an unparseable request outright, so the auction never happens. In production this usually shows up as a partner reporting a 100% error rate while your own logs look clean, because the corruption happens in serialization or transport after your builder runs.

How to fix it

Serialize with a real JSON library rather than string concatenation or templates, and validate the exact bytes you send, after compression and any proxy hops. The tester shows the parser's error position, which points at the first corrupt byte.

Example that trips it

{ "id": "req-1", "imp": [ ] 

Truncated body: the closing brace never arrives.

Check your payload

Paste a bid request or response into the tester to see whether this code fires against it, or gate on the id in CI with the CLI: the id is stable, wording is not.

Back to the full diagnostic code reference.