Skip to content

Ignore unknown fields in JSON parser#518

Merged
yuri-sergiichuk merged 4 commits intomasterfrom
allow-unknown-fields-in-json
Mar 12, 2020
Merged

Ignore unknown fields in JSON parser#518
yuri-sergiichuk merged 4 commits intomasterfrom
allow-unknown-fields-in-json

Conversation

@yuri-sergiichuk
Copy link
Contributor

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.

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.
@yuri-sergiichuk yuri-sergiichuk requested a review from armiol March 11, 2020 16:10
@yuri-sergiichuk yuri-sergiichuk self-assigned this Mar 11, 2020
@codecov
Copy link

codecov bot commented Mar 11, 2020

Codecov Report

Merging #518 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@             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

Copy link
Collaborator

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuri-sergiichuk please mention the new behavior in the class-level and/or method-level docs.

@yuri-sergiichuk yuri-sergiichuk merged commit 3948f6a into master Mar 12, 2020
@yuri-sergiichuk yuri-sergiichuk deleted the allow-unknown-fields-in-json branch March 12, 2020 10:32
@dmitrykuzmin dmitrykuzmin mentioned this pull request Sep 8, 2020
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

Successfully merging this pull request may close these issues.

2 participants