Skip to content
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

required field being deserialized as empty string #986

Open
scullionw opened this issue Feb 21, 2024 · 0 comments
Open

required field being deserialized as empty string #986

scullionw opened this issue Feb 21, 2024 · 0 comments

Comments

@scullionw
Copy link

Is this expected? From what i understand, in proto2, if a field is marked as required then deserialization should fail if it is missing

Generated code (See required field)
Screenshot 2024-02-21 at 4 46 51 PM

Raw protoc decode (field is missing)
Screenshot 2024-02-21 at 4 45 17 PM

prost decoded struct (deserialization succeeded, empty string)
Screenshot 2024-02-21 at 4 48 42 PM

fwiw our nodejs protobuf library does fail on decode, but im wondering what the expected behaviour is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant