3 ms·
> In a certain way, even getting rid of null/default values doesn't fix all problems when it comes to things like updating data. The way this is addressed in G
by sleepydog 6y ago
> In a certain way, even getting rid of null/default values doesn't fix all problems when it comes to things like updating data.
The way this is addressed in Google's public APIs is with the use of a "field mask"[1]. You provide a list of dotted paths to the fields you want to update. I'm not sure if that serves as an indictment of the design decisions made in protobuf, or if it's just one less bad tradeoff among several bad ones.
[1]: https://github.com/protocolbuffers/protobuf/blob/e9360dfa53f151e64c996823785e0eb6c8118620/src/google/protobuf/field_mask.proto#L43 https://github.com/protocolbuffers/protobuf/blob/e9360dfa53f...