-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
help wantedExtra attention is neededExtra attention is needed
Description
- TIA Toolbox version: All
- Python version: All
- Operating System: All
Description
If a properties dictionary of an annotation has a . in it, some operations of AnnotationStore behave unexpectedly if the operation involves the usage of json_extract
Cause
The root of the issue is in the line:
tiatoolbox/tiatoolbox/annotation/dsl.py
Line 268 in 3cea662
| return f"json_extract(properties, {json.dumps(f'$.{self.acc}')})" |
In the case of a key which contains a . this ends up being incorrectly parsed. For example, if properties dict has a key 'MSI.status' and you try to do an operation which needs to access that property from the json, it gets parsed into a json_extract function call that instead of accessing a field 'MSI.status' in the JSON, tries to access a subfield 'status' of a field 'MSI' in the JSON
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed