Skip to content
Snippets Groups Projects
Commit e3b81a60 authored by Simon Wittl's avatar Simon Wittl
Browse files

Merge branch 'readme' into 'main'

Readme

See merge request roboct/definitions/json_schemas!2
parents f0b9a4a3 4f641715
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,17 @@ This schema defines the properties for projection data in THD JSON format.
### Examples
```python:../scripts/validate_thd_json.py:o:main
```python:../scripts/validate_thd_json.py
from jsonschema import validate, ValidationError
import json
from pathlib import Path
SHEMA = Path('./thd_json/projection.json')
FILE = Path('./examples/thd_json/test_thd.json')
def main():
with open(str(SHEMA)) as schema_file, open(str(FILE)) as data_file:
schema = json.load(schema_file)
......@@ -47,4 +57,7 @@ def main():
except ValidationError as e:
print("Validation error:", e)
if __name__ == '__main__':
main()
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment