Re: JSON Emergency Brake

Hi Richard, all,

On Thu, Aug 25, 2011 at 15:10, Richard Cyganiak <richard@cyganiak.de> wrote:
>> On Wed, Aug 24, 2011 at 18:10, Alexandre Passant <alex@seevl.net> wrote:
>>> I guess that the link to an external @context could do the job. You
>>> can also have this context automatically generated by the app, that's
>>> how we're doing it in Seevl.
>>
>>> From my POV, removing all CURIES from the JSON itself, and
>>> keeping namespaces only in the context (ideally in an external
>>> document, so that the "data file" is completely namespace-less, as
>>> RDFa profiles) is the best way to reach Web-dev that are not semweb
>>> geeks. And the way RDF should go to have a JSON serialisation (and RDF
>>> data !) that can reach the masses.
>
> Strong +1.
Would be nice if we made this happen, yes.

>> "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? 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)". So to avoid all
confusion, here's what I was suggesting:

* This is how it _currently_ works (shortened for legibility):

>$ curl -i https://www.example.com/test.jsonld
HTTP/1.1 200 OK
Date: Fri, 26 Aug 2011 07:33:56 GMT
Status: 200 OK
ETag: "72054d9a6fbdcc7df012e19f32345b65"
Last-Modified: Fri, 26 Aug 2011 07:33:56 GMT
Content-Type: application/json; charset=utf-8

{
  "@context": "http://example.org/json-ld-contexts/person",
  "name": "Manu Sporny",
  "homepage": "http://manu.sporny.org/",
  "avatar": "http://twitter.com/account/profile_image/manusporny"
}

* 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
Date: Fri, 26 Aug 2011 07:33:56 GMT
Status: 200 OK
ETag: "72054d9a6fbdcc7df012e19f32345b65"
Last-Modified: Fri, 26 Aug 2011 07:33:56 GMT
Content-Type: application/json; charset=utf-8
Link: <http://example.org/json-ld-contexts/person>; rel="@context
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 07:42:17 UTC