-
Notifications
You must be signed in to change notification settings - Fork 15.7k
optional
is not working, it doesn't allow me to set a field to null
#11790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not a maintainer, but everything works as designed here, |
Then why If |
Null fields do not exist in protobuf. Getters, for example, should never return null, irrespective of the language. Please note that a similar question has already been asked before and the official advice is to rely on the |
Could you guys make a simple logic check like this:
And in the client side, the program will do this:
|
This is working as intended. Feel free to create a PR with your intended changes where we can review. |
This is so weird. Some language implementations treat |
As I tested out, the Python, Javascript/Typescript, Rust, Dart, they all support or about to support optional filed to null.
Why Java and Cpp can't do that?
grpc/grpc-java#9868
The text was updated successfully, but these errors were encountered: