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
// `NullValue` is a singleton enumeration to represent the null value for the// `Value` type union.//// The JSON representation for `NullValue` is JSON `null`.enumNullValue {
// Null value.NULL_VALUE=0;
}
json null value has to be interpreted as NULL_VALUE.
It seems to be not the case.
My TestMessage has a field as follows:
google.protobuf.NullValue null_value = 1;
When I try to send the following payload:
"null_value": null
I am getting an error:
"Error invoking method "TestService/test": error getting request data: message type TestMessage cannot set field null_value to null: it is not a message type".
If I handle the NullValue as an enum and send the following payload:
"null_value": "NULL_VALUE"
the request succeeds.
I would expect json null to be handled in the same as the "NULL_VALUE".
The text was updated successfully, but these errors were encountered:
According to the documentation https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto
for google.protobuf.NullValue type:
json
null
value has to be interpreted asNULL_VALUE
.It seems to be not the case.
My TestMessage has a field as follows:
When I try to send the following payload:
I am getting an error:
If I handle the NullValue as an enum and send the following payload:
the request succeeds.
I would expect json
null
to be handled in the same as the "NULL_VALUE".The text was updated successfully, but these errors were encountered: