Re: MIME type

We'll also need a MIME type for a JSON-LD context, which is a subset of JSON-LD, as only the @context elements are parsed, and the processing entrypoint is at http://json-ld.org/spec/latest/#context.

The latest version of the spec describes a context document as being just the JSON description of the context, not the enclosing @context relationship.

{
    "name": "http://xmlns.com/foaf/0.1/name",
    "homepage": "http://xmlns.com/foaf/0.1/homepage"
    "avatar": "http://xmlns.com/foaf/0.1/avatar"
}

In which case, I'd suggest application/ld-context+json and an extension of .jsonldc.

This could be avoided if we stayed with the previous description, where the context is included within a JSON-LD document as follows:

{
  "@context":  {
     "name": "http://xmlns.com/foaf/0.1/name",
     "homepage": "http://xmlns.com/foaf/0.1/homepage"
     "avatar": "http://xmlns.com/foaf/0.1/avatar"
   }
}

But we'd need to know that the purpose of the document is to extract the context, not to describe linked data.

Given that it really is a different document type, I'd go with the separate MIME type and extension. Alternatively, it could just be a plain JSON document with an assumed format, and we could just use application/json and .json to describe it.

Gregg

On Aug 3, 2011, at 9:20 AM, Nathan wrote:

Kingsley Idehen wrote:
On 8/3/11 12:08 PM, Markus Lanthaler wrote:
Kingsley Idehen wrote:
We currently use: application/x-json+ld .
What was the rationale behind this? Why didn't you use
application/x-ld+json?

Cos I had to make the decision in nano seconds, literally. We can change
it once there is clear consensus :-)

+1 from me for application/ld+json to signify +json compatibility.

and +1 for application/x-ld+json in the interim until there is a proper
mime type registered, which is good practise / following the rules.

note: not application/x-json+ld

Best,

Nathan

Received on Wednesday, 3 August 2011 22:56:26 UTC