From 8ca9fa5598239446edf2720b7f778cd87c8c5b7e Mon Sep 17 00:00:00 2001 From: Alejandro Villar Date: Tue, 22 Aug 2023 11:42:32 +0200 Subject: [PATCH] Only uplift JSON dicts and lists --- ogc/bblocks/validate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ogc/bblocks/validate.py b/ogc/bblocks/validate.py index 775babe..8037397 100644 --- a/ogc/bblocks/validate.py +++ b/ogc/bblocks/validate.py @@ -108,7 +108,8 @@ def validate_inner(): report.add_info('Files', f'"@graph" found, unwrapping') try: - if filename.suffix == '.json' and jsonld_context: + if (filename.suffix == '.json' and jsonld_context + and (isinstance(json_doc, dict) or isinstance(json_doc, list))): report.add_info('Files', 'JSON-LD context is present - uplifting') new_context = jsonld_context['@context'] if isinstance(json_doc, dict):