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

Use Pydantic's JSON encoder for everything #9

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

ljodal
Copy link
Contributor

@ljodal ljodal commented Jul 14, 2023

This allows us to put pydantic models inside e.g. a TypedDict and have it serialize to JSON just fine. We could probably simplify the logic a lot by just using this on everything, but I think I'll leave major changes for the Pydantic v2 update.

This allows us to put pydantic models inside e.g. a TypedDict and have
it serialize to JSON just fine. We could probably simplify the logic a
lot by just using this on everything, but I think I'll leave major
changes for the Pydantic v2 update.
@ljodal ljodal requested a review from andehen July 14, 2023 14:14
@ljodal ljodal merged commit cf89ef5 into main Jul 14, 2023
@ljodal ljodal deleted the ljodal/pydantic-model-in-dicts branch July 14, 2023 14:22
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