Skip to content

Conversation

MaximilianClemens
Copy link
Contributor

Fixes #300.
Serialization on model_dump = ObjectId
Serialization on model_dump_json = str

@MaximilianClemens MaximilianClemens changed the title Update mongo_object_id.py Fix serialization of mongo_object_id Mar 24, 2025
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 78ac0a3 into pydantic:main Mar 24, 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.

MongoObjectId: model_dump returns string instead of ObjectId

2 participants