Re: where to put json-ld context for LDP

On Jul 28, 2014, at 7:12 AM, Sandro Hawke <sandro@w3.org> wrote:

> If I understand right, we want a JSON-LD context for LDP.
> 
> It seems to me it should probably be hosted on w3.org.
> 
> It seems to me we'll have more of these over the years.
> 
> Any thoughts on where they should go?

If the context is part of a JSON-LD encoding of the vocabulary, then retrieving the vocabulary from it's published location with content-negotiation for JSON-LD will also retrieve the context.

If the LDP vocabulary were http://w3.org/ns/ldp, then creating a http://w3.org/ns/ldp.jsonld, which includes the LDP context would service quite nicely; in fact, I would say this is a best practice.

You could then use this in a JSON-LD document such as:

{
  "@context": "http://w3.org/ns/ldp",
  "@id": "..."
  ...
}

A JSON-LD processor will set Accept to include application/ld+json, so should retrieve the JSON-LD version of the vocabulary, if content negotiation is property configured.

Note that this now works for http://schema.org/, which is both the vocabulary prefix and the JSON-LD context. If the serve the vocabulary from there, in some form, that would be even better.

Gregg

>     -- Sandro
> 
> 

Received on Monday, 28 July 2014 17:41:15 UTC