-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Description
The dataPar.json of the TestDataSet is invalid (1 comma too much); perhaps this was fixed automatically in the previous json reader. Also, the error is not clear enough.
ERROR:
Error using jsondecode
JSON syntax error at line 5, column 2 (character 92): expected quoted name but found '}'.
Error in xASL_io_ReadJson (line 46)
json = jsondecode(txt);
- So "syntax error" could be too generic/unknown word for some layman users.
- Even I don't know what "quoted name" means, please rewrite to more layman language
- The path of the invalid JSON is not shown
Tasks
- Fix TestDataSet
dataPar.json -
xASL_io_ReadJson: add path invalid JSON & a hint, something like:
"ERROR: /Users/ExploreASL/derivatives/dataPar.json is an invalid JSON".
HINT: test your JSON file content at https://jsonlint.com/
- Do we need to change
xASL_ut_function_xASL_io_ReadJson.m?
How to test
Add an illegal comma in 'ExploreASL/External/TestDataSet/dataPar.json' and run
xASL_io_ReadJson('ExploreASL/External/TestDataSet/dataPar.json');
Release notes
User-friendly warnings when JSON is invalid. Report together with #1311
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working