Closed mxi-box closed 6 months ago
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication
"Empty" length-delimited values (such as empty strings) can be validly represented in serialized values: the field is "present," in the sense that it appears in the wire format. However, if the generated API does not track presence, then these values may not be re-serialized; i.e., the empty field may be "not present" after a serialization round-trip.
It seems messages with all optional fields zeroed can be ignored in wired format. (in the docs your provided)
"Empty" length-delimited values (such as empty strings) can be validly represented in serialized values: the field is "present," in the sense that it appears in the wire format. However, if the generated API does not track presence, then these values may not be re-serialized; i.e., the empty field may be "not present" after a serialization round-trip.
It seems messages with all optional fields zeroed can be ignored in wired format. (in the docs your provided)
if the generated API does not track presence, ...
Then the table Presence in proto3 APIs below writes that singular message's presence must be tracked regardless of optional
Okay, you are right. Merged.
According to Application note: Field presence, a Singular Message field without optional adjective should also have Explicit Presence. Ignoring zero-length message field causes indistinguishable presence.