Skip to content
Snippets Groups Projects
Commit f2f215f2 authored by Benedikt's avatar Benedikt
Browse files

Version 2.3.2

parent fd510f9d
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Thie Package contains an Libary for XML<-->JSON Conversion for the DCC (Digital Calibration Certificate). Thie Package contains an Libary for XML<-->JSON Conversion for the DCC (Digital Calibration Certificate).
Witch contains an Python Module for the conversion. Aswell as an tornador REST-API Server to remote call this conversion. Witch contains an Python Module for the conversion. Aswell as an tornador REST-API Server to remote call this conversion.
## Conversion Rules ## Conversion Rules
0. The XML Document ist converted into a nested dict, containing lists for repatable elements. Repeated elements are determined by there name or by the name of the parent Element. [listDCCElements.json](src/dccXMLJSONConv/data/listDCCElements.json) contains a comprehensive list of the repeated fild names/parent names. 0. The XML Document ist converted into a nested dict, containing lists for repatable elements. Repeated elements are determined by there name or by the name of the parent Element. [schemaTypeCastCache.json]([typeCastDictCreator.py](src/dccXMLJSONConv/data/schemaTypeCastCache.json)) contains a comprehensive list of the repeated fild names/parent names.
1. The actual `string` Conent of an Element is stored as `string` in the `#text` Element of the JSON-Nodes. If the content is an List of strings, the `#list` Element contains the list of elements vastet to float if posible. 1. The actual `string` Conent of an Element is stored as `string` in the `#text` Element of the JSON-Nodes. If the content is an List of strings, the `#list` Element contains the list of elements vastet to float if posible.
2. Since JSON Don't support attributes, all attributes are converted to dict Keys Starting with an @ 2. Since JSON Don't support attributes, all attributes are converted to dict Keys Starting with an @
3. Comments are converted to an adition dict key '@_Comment' containing a list of all comments in the coresonding XML-Element, the order ist preserved. The actual position of the comment is not. 3. Comments are converted to an adition dict key '@_Comment' containing a list of all comments in the coresonding XML-Element, the order ist preserved. The actual position of the comment is not.
......
[metadata] [metadata]
name = dccXMLJSONConv name = dccXMLJSONConv
version = 2.3.1 version = 2.3.2
description = Python module for converting XML DCC (https://www.ptb.de/dcc/) to JSON and vice versa description = Python module for converting XML DCC (https://www.ptb.de/dcc/) to JSON and vice versa
long_description = file: README.md long_description = file: README.md
long_description_content_type = text/markdown long_description_content_type = text/markdown
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment