Use latest jsonld.js.
--- a/playground/jsonld.js Wed Jan 11 22:13:11 2012 -0500
+++ b/playground/jsonld.js Thu Jan 12 13:31:11 2012 -0500
@@ -242,10 +242,18 @@
}
}
- // term not found, if term is @type, use keyword
- if(rval === null && iri === '@type')
+ // term not found, if term is keyword, use alias
+ if(rval === null)
{
- rval = _getKeywords(ctx)['@type'];
+ var keywords = _getKeywords(ctx);
+ if(iri in keywords)
+ {
+ rval = keywords[iri];
+ if(rval !== iri && usedCtx !== null)
+ {
+ usedCtx[rval] = iri;
+ }
+ }
}
// term not found, check the context for a prefix