Skip to content
Snippets Groups Projects

Improve/xml deserialization

Merged Leon Mauritz Möller requested to merge improve/xml_deserialization into master

This merge request adds the customizing pattern from the json serialization to the xml serialization - which is now not necessary anymore for it's original usecase, but will be useful for parsing stripped xml elements in the http api.
Furthermore, the functions read_aas_xml_file_into() and read_aas_xml_element() were added. read_aas_xml_element() should originally accept a type and a decoder class, but because mypy doesn't narrow down type variables for if type_ is SomeType and the issue was still present with if issubclass(type_, SomeType), despite it narrowing down the type, I decided to change the API and just pass a constructor function to it, as I think that it is prettier than telling mypy to ignore the type at the end of each line.

see #63 (closed) #91
fixes #74 (closed)

Edited by Leon Mauritz Möller

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading