Skip to content

Commit 85f7733

Browse files
committed
add json property to context class
1 parent adb4b75 commit 85f7733

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bids_validator/context.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,12 @@ def columns(self) -> None:
373373
pass
374374

375375
@property
376-
def json(self) -> None:
376+
def json(self) -> Namespace | None:
377377
"""Contents of the current JSON file."""
378-
pass
378+
if self.file_parts.extension == '.json':
379+
return Namespace.build(load_json(self.file))
380+
381+
return None
379382

380383
@property
381384
def gzip(self) -> None:

0 commit comments

Comments
 (0)