8000 Is there a way to deserialize discriminated union? · Issue #238 · dapper91/pydantic-xml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Is there a way to deserialize discriminated union? #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hellozyemlya opened this issue Feb 7, 2025 · 1 comment
Open

Is there a way to deserialize discriminated union? #238

hellozyemlya opened this issue Feb 7, 2025 · 1 comment
Labels
question Further information is requested

Comments

@hellozyemlya
Copy link

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?

@dapper91
Copy link
Owner
dapper91 commented Feb 9, 2025

@hellozyemlya Hi

No, there is no such functionality in pydantic-xml.

@dapper91 dapper91 added the question Further information is requested label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants
0