From deb6afeac54b840c24b221b57e52824bee843495 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Wed, 1 Oct 2014 19:58:06 -0400 Subject: [PATCH] Skip array processing for keywords that aren't @graph or @list. --- jsonld.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jsonld.php b/jsonld.php index a1116e5..c17020a 100644 --- a/jsonld.php +++ b/jsonld.php @@ -2050,6 +2050,15 @@ class JsonLdProcessor { continue; } + // skip array processing for keywords that aren't @graph or @list + if($expanded_property !== '@graph' && $expanded_property !== '@list' && + self::_isKeyword($expanded_property)) { + // use keyword alias and add value as is + $alias = $this->_compactIri($active_ctx, $expanded_property); + self::addValue($rval, $alias, $expanded_value); + continue; + } + // Note: expanded value must be an array due to expansion algorithm. // preserve empty arrays