From 4eb2832c11ffc793048961040b087c9a8bd0daaa Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Fri, 28 Oct 2011 16:52:05 -0400 Subject: [PATCH] Use @context property with external contexts. --- jsonld.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsonld.php b/jsonld.php index 107ecdb..bda67ea 100644 --- a/jsonld.php +++ b/jsonld.php @@ -292,7 +292,7 @@ function jsonld_resolve($input, $resolver) if(!is_string($result)) { // already deserialized - $urls[$url] = $result; + $urls[$url] = $result->{'@context'}; } else { @@ -304,7 +304,7 @@ function jsonld_resolve($input, $resolver) 'Could not resolve @context URL ("$url"), ' . 'malformed JSON detected.'); } - $urls[$url] = $tmp; + $urls[$url] = $tmp->{'@context'}; } }