xsdata.formats.dataclass.parsers.json module¶
-
class
xsdata.formats.dataclass.parsers.json.
JsonParser
(context=<factory>)[source]¶ Bases:
xsdata.formats.bindings.AbstractParser
Json parsing and binding for dataclasses.
- Parameters
context (
XmlContext
) – Model metadata builder
-
parse
(source, clazz)[source]¶ Parse the JSON input stream and return the resulting object tree.
- Parameters
source (
BytesIO
) –clazz (
Type
[~T]) –
- Return type
~T
-
parse_context
(data, clazz)[source]¶ Recursively build the given model from the input dict data.
- Raises
ParserError – When parsing fails for any reason
- Parameters
- Return type
~T
-
class
xsdata.formats.dataclass.parsers.json.
DictConverter
(context=<factory>)[source]¶ Bases:
xsdata.formats.dataclass.parsers.json.JsonParser
- Parameters
context (
XmlContext
) –