Rule reference

Flag field is 0 or 1 where protobuf JSON wants true or false

openrtb.dialect.integer_for_boolerrorRequest or response

The payload was validated as protobuf JSON, and a field the OpenRTB protobuf schema declares bool arrived as an integer. A protojson parser rejects the whole payload.

What it means

The payload was declared as protobuf JSON, and one of the 28 fields the IAB OpenRTB protobuf schema declares bool carried 0 or 1 instead of false or true. Protobuf JSON has no integer-to-bool coercion: a bool field accepts only the JSON literals true and false.

Why it matters

This is not a style difference. protojson.Unmarshal fails on the message and the receiving agent gets nothing at all, so a single stray flag drops the entire request rather than one field. It is the most common defect in hand-written protobuf JSON fixtures, because the author copied a value from an OpenRTB JSON example that was correct in its own dialect.

How to fix it

Write true or false for these fields when the payload travels over protobuf, or generate the JSON with protojson rather than by hand. If the payload was never meant to be protobuf JSON, drop the proto-json dialect and validate it as spec JSON instead.

Example that trips it

{ "id": "req-1", "imp": [{ "id": "1", "secure": 1, "banner": { "w": 300, "h": 250 } }] }

Validated with --dialect proto-json. The same payload is correct in the default spec JSON dialect.

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.