W3C home > Mailing lists > Public > public-rdf-wg@w3.org > August 2011

Re: JSON Emergency Brake

From: Richard Cyganiak <richard@cyganiak.de>
Date: Fri, 26 Aug 2011 11:35:35 +0100
Cc: Alexandre Passant <alex@seevl.net>, RDF WG <public-rdf-wg@w3.org>
Message-Id: <2361927A-C24F-4C1B-BFFE-88600B51E85E@cyganiak.de>
To: Thomas Steiner <tomac@google.com>
On 26 Aug 2011, at 08:41, Thomas Steiner wrote:
>>> "Link headers, the mullet of the Web: business in the front, party in
>>> the back. Idea: serve #JSON, make it #jsonLD by a @context Link
>>> header."
>> Are you talking about the Link: HTTP header? That doesn't make sense. Why would you use an HTTP header for something that's specific to a single representation format? What's the advantage over putting it into the representation format?
> I am indeed talking about the HTTP Link header. Why shouldn't it make
> sense to use it?

It's really easy to include the link in the representation format. For many developers, it's harder to set an HTTP header. So it increases the risk that people just won't do it, and it increases the cost of using JSON-LD.

You may think that setting an HTTP header isn't hard, but believe me, you're wrong. This is one of the things I've learned from the whole 303 mess.

Also, I can see absolutely no advantage to using an HTTP header here.

> Even in the paragraph above, you "strongly +1" the
> idea of separating the actual data (key-object pairs) from the
> metadata about the keys (the context). You "+1'ed" among others this
> line: "(ideally in an external document, so that the "data file" is
> completely namespace-less, as RDFa profiles)".


Currently, you can either include the context with the data, or put it into a separate document and link it via @context. I like the second option. I do not like the first option. I would remove the first option from JSON-LD, or at least strongly de-emphasize it in the spec (currently there are *many* examples that use an embedded context).

The reason is that a) the context is noise to most users (who don't care much about RDF), and b) it bloats the payload.

> * This is how it could work _in the future_ (shortened for legibility):
>> $ curl -i https://www.example.com/test.jsonld
> HTTP/1.1 200 OK
> Link: <http://example.org/json-ld-contexts/person>; rel="@context

As I said, using the Link HTTP header brings no advantage over embedding the link in the representation. The processing of rel="@context" is specific to JSON-LD anyways, so why not include the link in the JSON-LD payload.


> http://json-ld.org/spec/latest/#the-context"
> {
>  "name": "Manu Sporny",
>  "homepage": "http://manu.sporny.org/",
>  "avatar": "http://twitter.com/account/profile_image/manusporny"
> }
> Link headers, the mullet of the Web: business in the front, party in
> the back. Idea: serve #JSON, make it #jsonLD by a @context Link
> header.
> Makes sense now?
> Best,
> Tom
> -- 
> Thomas Steiner, Research Scientist, Google Inc.
> http://blog.tomayac.com, http://twitter.com/tomayac
Received on Friday, 26 August 2011 10:36:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:08 UTC