Ignore unknown fields in JSON parser#518
Merged
yuri-sergiichuk merged 4 commits intomasterfrom Mar 12, 2020
Merged
Conversation
While the Protobuf itself follows the ignorance strategy for unknown field values, we do want to follow the same strategy with JSON values as well. Such an approach makes it easier to perform data migrations and allows to overcome changes that were previously available in older proto schemas.
Codecov Report
@@ Coverage Diff @@
## master #518 +/- ##
============================================
+ Coverage 73.89% 73.89% +<.01%
Complexity 2901 2901
============================================
Files 500 500
Lines 11716 11717 +1
Branches 651 651
============================================
+ Hits 8657 8658 +1
Misses 2835 2835
Partials 224 224 |
armiol
approved these changes
Mar 11, 2020
Collaborator
armiol
left a comment
There was a problem hiding this comment.
@yuri-sergiichuk please mention the new behavior in the class-level and/or method-level docs.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While the Protobuf itself follows the ignorance strategy for unknown fields, we do want to follow the same strategy with JSON as well.
Such an approach makes it easier to perform data migrations and allows overcome issues with parsing objects with older/newer proto schemas.