proto3-suite icon indicating copy to clipboard operation
proto3-suite copied to clipboard

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

Open arobertn opened this issue 3 years ago • 1 comments

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 avatar Aug 30 '21 14:08 arobertn

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)

Gabriella439 avatar Sep 03 '21 18:09 Gabriella439