Add support for deserialization of pydantic child models by saving class unique ids in the serialized data.