by parthdesai · 2y ago · 0 comments
A better example is Int32Value. By default, protobuf will serialize int32 to 0 if it's not present.
E.g.
- type.specified => “”
- type.unspecified => empty
The same technique can be used to disambiguate between 0 and empty.