Python – Pydantic serialiser transform in other model
I want to use Pydantic 2 to export data to a Kafka Sub Queue and I need to export to JSON in a different model.
pydantic: how know which class was serialized to json
look at example
BaseModel.model_dump_json() got an unexpected keyword argument ‘serialize_as_any’
I use pydantic 2.5.3.