Value of oneof field is always null
Hi,
There is a display bug with the oneof fields. Even if one of the values is set, it always displays null.
Example :
message Message1 {
string name = 1;
oneof example {
Type1 value1 = 8;
Type2 value2 = 9;
}
}
Output :
{
"name": "Dexter",
"example": null
}
Tried it locally, definitely an issue, but I think it's something to do with protobuf.js rather than grpcc:
https://github.com/grpc/grpc/issues/7200 https://github.com/google/protobuf/issues/1741
Both those bugs are closed but it's still broken even if I update all the deps. I'll need to take a deeper look.
Hi, any update on this subject? I use oneof in my proto but I always get null. Thanks
how could i shield null items in the response of grpcc? thanks the result below is my response, how could i retain the non-null values only? "requireKeywordsWithIndex": { "age": "", "backgrounds": [], "directions": [], "experiences": [], "certs": [], "workYears": [], "companyTypes": [], "gender": [], "industries": [], "locations": [], "majors": [], "maritialStatus": [], "salary": [], "schoolTypes": [], "stability": [], "targetCompany": [], "degrees": [], "degreeOthers": [], "intentType": [], "skills": [ "2.0年以上java编程(0)" ],