Skip to content

limit iso8601 serialization of duration to json #297

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

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

hoesler
Copy link
Contributor

@hoesler hoesler commented Mar 6, 2025

Follow up to #296 which fixes/improves (de-)serialization of Duration models.

This PR:

  • limits iso8601 serialization to json
  • adds json serialization to test case
  • checks for equality of years and months explicitly

Copy link
Collaborator

@yezz123 yezz123 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@yezz123 yezz123 merged commit d63ded3 into pydantic:main Mar 6, 2025
10 checks passed
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