-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
feature requestfeedback wantedtopic-serializationHow Pydantic serializes data, often related to `model_dump`, etc.How Pydantic serializes data, often related to `model_dump`, etc.
Description
From a user perspective I would rather add an exclude in the Config metaclass instead of passing the dict in to .json(). One of my model's fields is a Callable and I would like to call .json() on it, however I need to instead pass a custom encoder to the .json() which still puts the responsibility on the caller.
Originally posted by @enkoder in #648 (comment)
svenstaro, LanderMoerkerke, tier-ckk, antnieszka, gmetzker and 20 more
Metadata
Metadata
Assignees
Labels
feature requestfeedback wantedtopic-serializationHow Pydantic serializes data, often related to `model_dump`, etc.How Pydantic serializes data, often related to `model_dump`, etc.