-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
How to properly turn pydantic schemas into json?
The problem is that the BaseModel.dict() method returns dict, it's okay but it doesn't convert some default types into string (datetime.date, Enum and etc.).
It seems there is no other way to translate pydantic object into dict and serialize those types which is strange as pydantic can deserialize them and even force specific format in some way (datetime_parse.date_re for example which is hardcoded and hardly changeable).