diff --git a/fsl/data/image.py b/fsl/data/image.py index e21ad87c2cf34cfe629ecba94e7cf2890cfb0472..80cffb6a97efb7964c32d846af9715c19d3f5d0a 100644 --- a/fsl/data/image.py +++ b/fsl/data/image.py @@ -1569,7 +1569,7 @@ def loadMetadata(image): jsonfile = op.join(dirname, '{}.json'.format(basename)) if op.exists(jsonfile): with open(jsonfile, 'rt') as f: - return json.load(f) + return json.load(f, strict=False) return {} diff --git a/fsl/utils/bids.py b/fsl/utils/bids.py index 671fb4c28650d912ff1579ab350cf5e99ae0c116..61fc12830aa324848d0a3b32c7d350a800fc2b4b 100644 --- a/fsl/utils/bids.py +++ b/fsl/utils/bids.py @@ -187,7 +187,7 @@ def isBIDSFile(filename, strict=True): def loadMetadataFile(filename): """Load ``filename`` (assumed to be JSON), returning its contents. """ with open(filename, 'rt') as f: - return json.load(f) + return json.load(f, strict=False) def loadMetadata(filename):