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 json encoders to handle IO #2101

Open
tylerflex opened this issue Dec 4, 2024 · 0 comments
Open

Use json encoders to handle IO #2101

tylerflex opened this issue Dec 4, 2024 · 0 comments

Comments

@tylerflex
Copy link
Collaborator

Right now we use the standard .json() method from pydantic and our own logic to do some encoding.

see #2099

It would be better in the long run to implement json encoders to do this more generally and have it integrated better with the json package.

Either through pydantic directly
https://docs.pydantic.dev/1.10/usage/exporting_models/#json_encoders

Or using the json package
https://docs.python.org/3/library/json.html

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

No branches or pull requests

1 participant