We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I encounter a limit Iam curious why it is there.
Assuming the following code:
from dataclasses import dataclass, field from xsdata.formats.dataclass.parsers import DictDecoder test_dict = { "dict_type": { "a": { "name": "namea", "value": 1 }, "b": { "name": "nameb", "value": 2 }, "c": { "name": "namec", "value": 3 } } } @dataclass class TestMember: name: str = field( metadata={ "type": "Element", "required": True } ) value: int = field( metadata={ "type": "Element", "required": True } ) @dataclass class Test: dict_type: dict[TestMember] DictDecoder().decode(test_dict, Test)
It will end up with:
xsdata.exceptions.XmlContextError: Error on Test::dict_type: Xml Text does not support typing `dict[__main__.TestMember]`
May I ask, what are the limitations here or for a hint what I did wrong?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I encounter a limit Iam curious why it is there.
Assuming the following code:
It will end up with:
May I ask, what are the limitations here or for a hint what I did wrong?
The text was updated successfully, but these errors were encountered: