Skip to content

Commit

Permalink
Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
otto-ifak committed Nov 30, 2023
1 parent 8e2f669 commit 2c6f501
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ from aas_test_engines import file
from xml.etree import ElementTree

with open('aas.aasx') as f:
file.check_aasx_file(f)
result = file.check_aasx_file(f)
# result.ok() == True

result.dump()
```

### Check JSON:
Expand All @@ -33,15 +36,19 @@ from aas_test_engines import file

# Check file
with open('aas.json') as f:
file.check_json_file(f)
result = file.check_json_file(f)
# result.ok() == True

# Or check data directly
aas = {
'assetAdministrationShells': [],
'submodels': [],
'conceptDescriptions': []
}
file.check_json_data(aas)
result = file.check_json_data(aas)
# result.ok() == True

result.dump()
```

### Check XML:
Expand All @@ -51,12 +58,16 @@ from xml.etree import ElementTree

# Check file
with open('aas.xml') as f:
file.check_xml_file(f)
result = file.check_xml_file(f)
# result.ok() == True

# Or check data directly
data = ElementTree.fromstring(
'<environment xmlns="https://admin-shell.io/aas/3/0" />')
file.check_xml_data(aas)
result = file.check_xml_data(aas)
# result.ok() == True

result.dump()
```

### Checking older versions
Expand Down

0 comments on commit 2c6f501

Please sign in to comment.