From 2c8b2ef18d088415cfc264ef7e530e6210d70684 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Wed, 13 Feb 2013 17:00:05 -0500 Subject: [PATCH] Expand @type: @vocab. --- jsonld.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jsonld.php b/jsonld.php index 5273026..ecccb6d 100644 --- a/jsonld.php +++ b/jsonld.php @@ -2706,6 +2706,11 @@ class JsonLdProcessor { return (object)array('@id' => $this->_expandIri( $active_ctx, $value, array('base' => true))); } + // do @id expansion w/vocab + if($type === '@vocab') { + return (object)array('@id' => $this->_expandIri( + $active_ctx, $value, array('vocab' => true, 'base' => true))); + } // do not expand keyword values if(self::_isKeyword($expanded_property)) {