Skip @context key.

This commit is contained in:
Dave Longley 2013-02-12 16:11:00 -05:00
parent 5466070d7d
commit d1ecc90e8a
1 changed files with 4 additions and 1 deletions

View File

@ -1679,7 +1679,6 @@ class JsonLdProcessor {
// if element has a context, process it // if element has a context, process it
if(property_exists($element, '@context')) { if(property_exists($element, '@context')) {
$active_ctx = $this->_processContext($active_ctx, $element->{'@context'}, $options); $active_ctx = $this->_processContext($active_ctx, $element->{'@context'}, $options);
unset($element->{'@context'});
} }
// expand the active property // expand the active property
@ -1692,6 +1691,10 @@ class JsonLdProcessor {
foreach($keys as $key) { foreach($keys as $key) {
$value = $element->{$key}; $value = $element->{$key};
if($key === '@context') {
continue;
}
// get term definition for key // get term definition for key
if(property_exists($active_ctx->mappings, $key)) { if(property_exists($active_ctx->mappings, $key)) {
$mapping = $active_ctx->mappings->{$key}; $mapping = $active_ctx->mappings->{$key};