Skip to content

Conversation

@software-dov
Copy link
Contributor

Parallels the to_json method.
Also adds options to ignore unknown fields during deserializtion.

Closes #153
Closes #151

Parallels the `to_json` method.
Also adds options to ignore unknown fields during deserializtion.
@software-dov software-dov requested review from a team as code owners October 19, 2020 21:31
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 19, 2020
@software-dov software-dov requested a review from tswast October 19, 2020 21:32
@software-dov software-dov added the automerge Merge the pull request once unit tests and other checks pass. label Oct 19, 2020
@codecov
Copy link

codecov bot commented Oct 19, 2020

Codecov Report

Merging #154 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #154   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          856       863    +7     
  Branches       148       149    +1     
=========================================
+ Hits           856       863    +7     
Impacted Files Coverage Δ
proto/message.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd9003c...c0031e4. Read the comment docs.

@gcf-merge-on-green gcf-merge-on-green bot merged commit ccf903e into googleapis:master Oct 19, 2020
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 19, 2020
@software-dov software-dov deleted the cerialization branch October 19, 2020 21:46
"""

def __init__(self, mapping=None, **kwargs):
def __init__(self, mapping=None, *, ignore_unknown_fields=False, **kwargs):
Copy link

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide ignore_unknown_fields=True option in from_json and from_dict Provide a to_dict method

3 participants