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

JSONPB json parsing not rejecting unknown fields by default as it should according to spec #172

Open
arobertn opened this issue Aug 30, 2021 · 1 comment

Comments

@arobertn
Copy link

Proto3 JSON parsers are supposed to reject unknown fields unless explicitly requested to ignore them. But I cannot find an option for this in JSONPB .eitherDecode; it operates in ignore mode. Am I missing something?

@arobertn arobertn changed the title JSONPB json parsing not rejecting unknown fields by default according to spec JSONPB json parsing not rejecting unknown fields by default as it should according to spec Sep 3, 2021
@Gabriella439
Copy link
Contributor

So I looked into this and it appears that this would require a breaking change to the API. Specifically parseJSONPB would need to take an additional Options argument (similar to toJSONPB)

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

2 participants