Skip to content

JSON serialzation #133

@xunto

Description

@xunto

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions