pydantic-xml
pydantic-xml copied to clipboard
[Question] Why i cant't use type Dict\dict without specifying keys and values type for xml model field typing
e.x.
class SomeModel(BaseXmlModel):
dict_content: Dict
@field_validator('dict_content', mode="before")
def _check_dict_content(
cls,
value: Any,
) -> Any:
try:
return orjson.loads(value)
except orjson.JSONDecodeError as exc:
capture_exception(exc)
pass
return {}
if worked on version 1.0.0 but after i updated code to pydantic v2 and pydantic_xml 2.11.0 it breaks