[Pydantic v2][Python] How to perform Serialization of a pydantic model with polymorphism?
Problem I tried to serialize a pydantic model with an attribute that can be of class of multiple subclasses of a base class. However with a naive implementation the subclasses are serialized to the baseclass. What I did After reading this issue I wrote the following code but without any success : Code from typing […]