protobuf-javascript icon indicating copy to clipboard operation
protobuf-javascript copied to clipboard

Oneof toObject loses case

Open nadilas opened this issue 4 years ago • 4 comments

What version of protobuf and what language are you using? Version: master/v3.6.0/v3.5.0 etc. Language: Javascript

What operating system Linux, Windows and version?

What runtime / compiler are you using (e.g., python version or gcc version)

What did you do? Steps to reproduce the behavior: generated classes and methods via protoc-grpc-web result in oneof losing its case when converted to a plain object by toObject() See https://github.com/grpc/grpc-web/issues/675 for details

What did you expect to see The result object to only have one defined property for the oneof case

What did you see instead? All of the oneof cases are generated in the result plain object with their type default values

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

nadilas avatar Mar 24 '20 20:03 nadilas