From d1ecc90e8a8089939dc6419f032f269f1fe3a356 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Tue, 12 Feb 2013 16:11:00 -0500 Subject: [PATCH] Skip @context key. --- jsonld.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jsonld.php b/jsonld.php index 24843a7..5273026 100644 --- a/jsonld.php +++ b/jsonld.php @@ -1679,7 +1679,6 @@ class JsonLdProcessor { // if element has a context, process it if(property_exists($element, '@context')) { $active_ctx = $this->_processContext($active_ctx, $element->{'@context'}, $options); - unset($element->{'@context'}); } // expand the active property @@ -1692,6 +1691,10 @@ class JsonLdProcessor { foreach($keys as $key) { $value = $element->{$key}; + if($key === '@context') { + continue; + } + // get term definition for key if(property_exists($active_ctx->mappings, $key)) { $mapping = $active_ctx->mappings->{$key};