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

Added Message.to_dict and from_dict support for repeated timestamps and durations #211

Merged
merged 3 commits into from
Feb 16, 2021

Conversation

badge
Copy link
Contributor

@badge badge commented Feb 15, 2021

  • Added support for repeated Timestamp and Duration types in Message.to_dict and from_dict, which previously raised an error as these use datetime and timedelta respectively
  • Added test which passes in this branch and fails in master
  • Original ignored list elements in the same way as the element types are checked in the to_dict method, but of course these are important to preserve order

Resolves #185.

- The previous logic implemented the same exclusion
   criteria for list elements as those of their object
   types, however excluding an element naturally
   messes up subsequent elements
Copy link
Collaborator

@nat-n nat-n left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the contribution :)

@nat-n nat-n merged commit 9e68819 into danielgtaylor:master Feb 16, 2021
@nat-n nat-n mentioned this pull request Feb 16, 2021
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.

Protobuf to JSON/Dict Fails for repeated datetime
2 participants