-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Can you differentiate between an empty map vs field not provided? #552
Comments
I, unfortunately, am not as expert with protos as I probably should be, but I don't believe there is a easy way to do that that doesn't involve fieldmasks which we don't currently support. That said there is some interest in implementing that in the gateway. Would you be interested in taking that sort of project on? |
thanks for the response. I had to move forward and use a wrapper around a map to handle this. I'm not going to be able to work on this with my present workload. |
You have to use field masks. This will be automatically supported with #671. |
@ Ianwww @achew22 Use this maybe: https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/StringValue |
With this proto definition
I'd like to send a request like
{"id":"myid","my_map":{}}
and set MyMap to an empty map.
Is this possible? Currently, when this field is provided, my service thinks this field is unset(MyMap==Nil). I'm working in golang.
The text was updated successfully, but these errors were encountered: