From 8f522da2f3c77071b7349cd959538e5f9161fcb8 Mon Sep 17 00:00:00 2001 From: pasquale95 Date: Thu, 1 Dec 2022 13:23:19 +0100 Subject: [PATCH] fixed issue with frame validation when type is '@json' Signed-off-by: pasquale95 --- lib/frame.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/frame.js b/lib/frame.js index 27675fb7..1d55ba55 100644 --- a/lib/frame.js +++ b/lib/frame.js @@ -465,7 +465,7 @@ function _validateFrame(frame) { if('@type' in frame[0]) { for(const type of util.asArray(frame[0]['@type'])) { // @id must be wildcard or an IRI - if(!(types.isObject(type) || url.isAbsolute(type)) || + if(!(types.isObject(type) || url.isAbsolute(type) || (type === '@json')) || (types.isString(type) && type.indexOf('_:') === 0)) { throw new JsonLdError( 'Invalid JSON-LD syntax; invalid @type in frame.',