You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm always frustrated when I see google.protobuf.Int32Value in a protobuf schema to represent an optionalint32 field, when the proto3 language has support for that directly via the optional keyword - including the programmer being able to detect whether the field is there or not. (As opposed to being "implicitly optional" in the usual proto3 way.)
Support optional in PBJ, hopefully identically to protoc from Google, but in any event meeting whatever (backward) compatibility we need w.r.t. our permanent protobuf structures.
Alternatives
Continue using wrappers such as google.protobuf.Int32Value. People who see that in our schemas will just understand it means optional int32.
The text was updated successfully, but these errors were encountered:
Problem
I'm always frustrated when I see
google.protobuf.Int32Value
in a protobuf schema to represent an optionalint32
field, when the proto3 language has support for that directly via theoptional
keyword - including the programmer being able to detect whether the field is there or not. (As opposed to being "implicitly optional" in the usual proto3 way.)This was added as a standard feature in protobuf v3.15.0, documented on this page.
Solution
Support
optional
in PBJ, hopefully identically toprotoc
from Google, but in any event meeting whatever (backward) compatibility we need w.r.t. our permanent protobuf structures.Alternatives
Continue using wrappers such as
google.protobuf.Int32Value
. People who see that in our schemas will just understand it meansoptional int32
.The text was updated successfully, but these errors were encountered: