W3C home > Mailing lists > Public > public-linked-json@w3.org > October 2011

Re: Distinguishing a context document from an instance document

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Sun, 02 Oct 2011 16:59:01 -0400
Message-ID: <4E88D095.9020009@digitalbazaar.com>
To: public-linked-json@w3.org
On 10/01/2011 05:51 PM, Ivan Herman wrote:
> We should be careful of recursion issues, though. If context document
> may refer to other context documents, that can play some nasty
> tricks.
> We may declare that when a context document is imported, json-ld
> processors to do not follow further context imports, ie, it stops at
> one level.

Very good point, Ivan.

If we adopt the suggestion that a "JSON-LD Context Document" is just a 
regular JSON-LD document, we could prevent recursion issues by stating 
that any context that is not embedded in the "JSON-LD Context Document" 
file MUST NOT be processed. So, for example, processing this "JSON-LD 
Context Document":

       "foo": "http://example.com/foo#"

... would load "foo" into the set of known prefixes. However, processing 
this "JSON-LD Context Document":

       {"foo": "http://example.com/foo#"}

.. would load "foo" into the set of known prefixes, but would not load 

-- manu

Manu Sporny (skype: msporny, twitter: manusporny)
Founder/CEO - Digital Bazaar, Inc.
blog: Standardizing Payment Links - Why Online Tipping has Failed
Received on Sunday, 2 October 2011 20:59:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:32 UTC