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

Re: Can JSON-LD cater for Talis' RDF/JSON design goals?

From: Steve Harris <steve.harris@garlik.com>
Date: Tue, 30 Aug 2011 08:56:20 +0100
Cc: Manu Sporny <msporny@digitalbazaar.com>, Thomas Steiner <tomac@google.com>, Ian Davis <ian.davis@talis.com>, RDF WG <public-rdf-wg@w3.org>, public-linked-json@w3.org
Message-Id: <C24D86C3-CD1C-4AD1-9E3C-D06685473EBD@garlik.com>
To: Richard Cyganiak <richard@cyganiak.de>
On 2011-08-29, at 15:08, Richard Cyganiak wrote:

> Hi Manu,
> On 29 Aug 2011, at 03:04, Manu Sporny wrote:
>>> The way to do this might be to define in the spec some sort of “RDF
>>> geek compatibility context” that could be used by anyone who wants a
>>> very regular and direct representation of RDF triples in JSON-LD. For
>>> example, my SPARQL store could use that context when serializing a
>>> CONSTRUCT result to JSON-LD.
>> I think a few lines of JavaScript could transform JSON-LD normalized form into the Talis RDF/JSON form.
> Well, given that RDF/JSON is intended for use without a Javascript library, it would perhaps be better if the format didn't require post-processing.
>>> If that would be possible, then I'd consider JSON-LD as addressing
>>> the use cases that motivate RDF/JSON [1].
>> I think it's possible... basically, you'd write a loop to go through each array item in JSON-LD normalized form array and create a new map that looks like the Talis RDF/JSON serialization:
>> for obj in jsonld_normalized:
>>  map[obj["@subject"]] = obj;
>>  delete obj["@subject"];
>> I think that pseudocode above basically gives you the Talis RDF/JSON format.
> I think this would result in a structure that makes access to the properties of specific resources quick and painless.
> Could JSON-LD be changed so that one can define an “RDF geek compatibility context” that directly results in this convenient form, without need for post-processing?

That immediately makes me think of the "XML friendly" striped syntax of RDF/XML, i.e. hurts everyone, all the time.

- Steve

Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Tuesday, 30 August 2011 07:56:45 UTC

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