-
Notifications
You must be signed in to change notification settings - Fork 56
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
Sample request: Pydantic v2 converter #97
Comments
I am setting up a new project and I would really appreciate this for the "type safety without having to redefine attributes twice" benefits! In particular, the |
Until the sample is present, you can apply the concepts/approaches of the custom conversion to whatever is needed for v2 without applying the specific code |
@JaneJeon I am using pydantic 2 with temporal just by changing from pydantic_core import to_jsonable_python
...
# We let JSON conversion errors be thrown to caller
return Payload(
metadata={"encoding": self.encoding.encode()},
data=json.dumps(value, separators=(",", ":"), sort_keys=True, default=to_jsonable_python).encode(),
) |
I am still getting
Does it work on your side? |
Describe the solution you'd like
Rename sample
pydantic_converter
topydanticv1_converter
(and tests/packages/dep-group/etc) and make a newpydantic_converter
sample that works with v2The text was updated successfully, but these errors were encountered: