-
Notifications
You must be signed in to change notification settings - Fork 132
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
Proto2 required fields are not serialized when they are the default value #612
Comments
Can confirm. Is this a bug or intended behavior? This should be solvable somehow. One approach is to made an option for those two functions to serialize |
There is only partial support for |
The info on partial support for proto2 is a bit outdated. The library is able to serialize and deserialize such fields without issues, there's no any From my experiments with other TS libraries this one is a clear winner, but the inability to configure default value writes to support There was actually a very similar request to support this case some time ago: #194 I can think of few approaches to make this work:
The |
Protobuf-ts doesn't serialize the resultCode field even though it is set. Would it be possible for protobuf-ts to emit code that handels the required in proto2 by removing the check for resultCode == 0?
The text was updated successfully, but these errors were encountered: