psychoinformatics-de / datalad-hirni

DataLad extension for (semi-)automated, reproducible processing of (medical/neuro)imaging data
http://datalad.org
Other
5 stars 8 forks source link

spec files are not valid JSON #122

Closed ted-strauss-K1 closed 5 years ago

ted-strauss-K1 commented 5 years ago

In the case of dicom import the spec file contains one JSON string for each dicom sequence. These are not assembled into a JSON array or other structure, but separated by a line break. As a result, the spec file is not valid JSON, which makes it less inter-operable. For instance, this tool could be used to make fine adjustments: https://jsoneditoronline.org/ Using a JSON array seems like the simplest solution to this.

bpoldrack commented 5 years ago

That's actually intentional and called a JSON stream. Two reasons: a) we can process such a spec one line at a time without reading and evaluating the entire thing first b) a git diff on such a spec is actually readable that way

In case you want to deal with those in your own code, we have helpers for that in datalad.support.json_py