> ## Content Index
> Fetch the complete content index at: https://datajutsu.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# The Same Silent Loss Runs Both Ways (and the Schema Is the Whole Boundary)
- URL: https://datajutsu.com/protobuf-silent-loss-both-directions/
- Published: 2026-10-25T08:04:49.000Z
- Updated: 2026-10-25T08:04:49.000Z
- Author: Data Jutsu

The schema is the whole boundary of what survives. Both doors of the converter enforce it, and both do it the same quiet way. On the decode side the boundary is a set of field numbers, and any number in the bytes that the schema does not list gets skipped and is not in the JSON. I measured it against the library that runs every tab: a message carrying a name, a field nine that is a varint seven, and an age, decoded under a schema with no field nine, and the result was the name and the age with no error, the nine just gone. The tag anatomy is in the [wire format post](https://datajutsu.com/how-protobuf-wire-format-works/), and the skip mechanics are in the [unknown fields post](https://datajutsu.com/protobuf-unknown-fields-streaming/). The point here is not the skip. The point is that it happens with no signal, because the decode that loses data is the one that succeeds.

Now the other door, and the same mismatch class. On the encode side the boundary is a set of key names, and any key in your JSON that the schema does not declare gets dropped and is not in the bytes. I handed the encoder a name, an age, and a key called bogus, under a schema with no bogus, and it wrote the name and the age with no error, the bogus just gone. No exception, no warning, no half-byte. The key never reached the object the encoder builds, so it could not reach the wire, and the output looked exactly like what you would have gotten had you not typed the key at all. That is the encode side of the story the [encoder door post](https://datajutsu.com/protobuf-json-encode-mismatch/) measured, and it is the exact mirror of the decode side: your input carries something your schema does not declare, and it is not in the result, and nothing tells you.

The symmetry is the part worth writing down, because it means the failure you are trying to catch is one failure. A field that should be there but is not. On the way in, the thing that is missing is a field number the schema has not caught up to, and the data is in the bytes and not in the JSON. On the way out, the thing that is missing is a key the schema has not caught up to, and the data is in the JSON and not in the bytes. Same shape, opposite direction, no error either way. A stale schema is not one bug, it is the same bug wearing two hats, and it is the one that a passing test will never catch, because the message round trips and the value you dropped was never in the schema to begin with. If your JSON is missing a key you set, the question is not whether the encode broke, it is whether the schema you are encoding against still has the field.

There are two twists, and both of them are the encode side of the symmetry wearing a costume. The first is that a null inside a repeated string field does not drop, it writes the literal word null as a string value on the wire, and decodes back as the string null, which is not the same as an absent item. I measured it: the bytes carry the four characters, not an empty slot, and the JSON you get back says the field had a value. The second twist is that an enum handed an unknown name drops the field entirely, no bytes, while the same enum handed an unknown number survives as a raw varint and decodes back to that number. So the encode door is not uniformly silent. Some mismatches throw, some drop, and one rewrites the value. The tool now names each one.

This is the pair of notes the converter prints, and they are the same sentence twice. On the decode tab, after the JSON, if the bytes hold a field number the schema does not have: a field number in the binary is not in this proto, it was skipped and is not in the JSON, and if you expect to see more data the schema is missing those fields. On the encode tab, after the bytes, if your JSON held a key the schema does not have: parts of your JSON did not reach the bytes, and it names each one. The notes are the only signal the format gives you, so the tool manufactures them, and they are the difference between a decode that loses data and a decode that tells you it lost data. Put your bytes and your schema in [proto.datajutsu.com](https://proto.datajutsu.com/?ref=datajutsu.com) and you will see both notes fire, on both tabs, for the same class of mismatch, which is the clearest proof that the boundary is the schema and the loss is silent on both sides of it.