W3C home > Mailing lists > Public > www-archive@w3.org > July 2013

Re: RDF interpretation of JSON-LD with missing context

From: Gregg Kellogg <gregg@greggkellogg.com>
Date: Mon, 1 Jul 2013 09:12:18 -0600
Cc: Markus Lanthaler <markus.lanthaler@gmx.net>, 'Pat Hayes' <phayes@ihmc.us>, 'www-archive' <www-archive@w3.org>, 'Manu Sporny' <msporny@digitalbazaar.com>, "'Hawke, Sandro'" <sandro@w3.org>, "'Wood, David'" <david@3roundstones.com>, 'David Longley' <dlongley@digitalbazaar.com>
Message-Id: <6B4F5FD7-3C0F-4832-A599-EE6F944CE756@greggkellogg.com>
To: David Booth <david@dbooth.org>

Gregg Kellogg
gregg@greggkellogg.net

On Jul 1, 2013, at 8:58 AM, David Booth <david@dbooth.org> wrote:

> In JSON-LD, terms are converted to URIs by use of a context.  However, a context may be in a separate document that may not be accessible to a client that is attempting to interpret that JSON-LD as RDF.  Hence, the client may be unable to determine the full URIs corresponding to the JSON-LD terms, in order to generate the correct RDF model.  Since this is likely to be a very common problem, I think the JSON-LD spec should provide some constructive guidance about how a client should deal with this situation.
> 
> What might be some reasonable guidance?  Something along the following lines?
> 
> [[
> If the context for a term cannot be obtained -- perhaps because the context document is unavailable -- then it may not be possible to reliably map that term to the IRI that the JSON-LD author intended.  In such cases, the client interpreting the JSON-LD document MAY perform a "best guess" mapping, with the understanding that the guess may be incorrect.  Suggested "best guess" techniques:
> 
> 1. If a context was previously available for an version of the JSON-LD document that is being processed, use that as the context.
> 
> 2. Otherwise, expand the JSON-LD terms as though they are relative URIs, relative to the document's base URI.
> ]]
> 
> Or, as a variation of #2 above perhaps a designated universal base URI
> such as http://example/JSON-LD/  or http://schema.org/ .
> 
> What do others think?

This is already covered in the JSON-LD API context processing algorithm in step 3.2.3:

[[[
Dereference context. If context cannot be dereferenced, a loading remote context failed error has been detected and processing is aborted.
]]]

Why are we not having this discussion on public-linked-json?

Gregg

> Thanks,
> David
> 
Received on Monday, 1 July 2013 15:12:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:44:21 UTC