Integrations

The JSON looks correct but parsing fails at the start: is a hidden BOM present?

A developer opens a request sample and sees ordinary JSON, while the receiver rejects it at the beginning. Reordering fields changes nothing. The comparison may need to examine what precedes the first brace, rather than only…

2 min readLast updated November 4, 2026
A developer and colleague reviewing a connection between business systems

A developer opens a request sample and sees ordinary JSON, while the receiver rejects it at the beginning. Reordering fields changes nothing. The comparison may need to examine what precedes the first brace, rather than only the visible words within the structure.

What can disappear from the display?

Text can begin with a byte-order mark, or BOM. The JSON specification prohibits adding it to network-transmitted JSON, but permits parsers to ignore it rather than report an error. One program may therefore accept a sample another rejects without field names causing the difference.

This is an investigation hypothesis, not an explanation for every first-character error. The body might actually be HTML, a text message or other non-JSON content. Inspect the response type and bytes received before deciding the cause from a general application-log message.

Inspect the raw copy before an editor saves it again

In a hypothetical example, a team prepares a request body from a saved file, then pastes it into a formatting tool. That tool may reinterpret the text or conceal the leading mark, leaving the employee's visible sample different from what reached the parser.

Keep the original in an authorised location and inspect its beginning with an appropriate technical tool, without uploading customer data or secrets to a public editor. Prepare a synthetic reproduction comparing source and receiver instead of modifying production requests during diagnosis.

If the sender is confirmed to add the mark when constructing the body, correct JSON production there under the contract. Do not make every receiver remove every invisible character from every string; this could alter original values or conceal another issue requiring investigation.

Preserve the signature and checking order

For signed requests, changing bytes before verification may prevent a matching signature check. Verifying a signature against the raw body explains that sequence. Do not confuse representation handling for parsing with establishing the integrity of the received message.

After correcting the cause, test structural acceptance, field values and the business outcome separately. Removing a parsing error does not establish that a field reached the right destination or the intended action occurred.

Record where the body was created, what changed and the synthetic comparison evidence. If parsing succeeds but Arabic appears as escape sequences, Arabic representation inside JSON covers that separate issue. A display difference alone does not require correction.