pydantic-xml icon indicating copy to clipboard operation
pydantic-xml copied to clipboard

Is there a way to deserialize discriminated union?

Open hellozyemlya opened this issue 8 months ago • 1 comments

I have model A and model B, discriminated by type field. In pydantic I can use TypeAdapter(A | B).validate_json() to parse A or B. But how I can do the same with pydantic-xml?

hellozyemlya avatar Feb 07 '25 09:02 hellozyemlya