Fwd: RDF interpretation of JSON-LD with missing context

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 a 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?

Gregg responded:
 > 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.
 > ]]]

Do you really think that JSON-LD documents will be completely ignored 
just because the context is missing?   In some cases a user may be able 
to get the JSON-LD author to correct the JSON-LD document or make the 
context available, but in other cases the user will have no way to do 
that, and I would imagine that in many cases the user would still like 
to get as much benefit from the JSON-LD document as possible.  So to my 
mind telling them to abort seems like turning a blind eye to the 
problem.  But I am really unsure of what people are likely to do in the 
situation of a missing context -- assuming that they still want to try 
to use the JSON-LD document.  Anybody know?

Thanks,
David

Received on Monday, 1 July 2013 17:39:34 UTC