W3C home > Mailing lists > Public > public-linked-json@w3.org > November 2014

Oh, just forget (was Re: "in #JSON-LD the keys in objects must be unique" -- why?)

From: François-Paul Servant <francoispaulservant@gmail.com>
Date: Sat, 22 Nov 2014 23:22:50 +0100
Cc: John Walker <john.walker@semaku.com>, public-linked-json@w3.org
Message-Id: <D9EA0BFD-1300-4CDB-A120-85579A4F9791@gmail.com>
To: Nicholas Bollweg <nick.bollweg@gmail.com>
forget all of that. This was a bad idea: mixing GUI related data and "real" data. Just transmit the "real data" (the graph), and the presentation data (the ordered list) separately.
Le 22 nov. 2014 à 22:21, François-Paul Servant <francoispaulservant@gmail.com> a écrit :

> Nicholas, John,
> thanks for the comments and pointers.
> What I would need is an ordered list of (prop, value) pairs (-- not of values)
> Ex, I have the following graph (in turtle):
> s
> 	p1 o11,o12,o13;
> 	p2 o21,o22,o23.
> Easy to represent in JSON-LD using arrays. However, I'd like to show the following to a human reader:
> s
> 	p1 o11;
> 	p2 o21;
> 	p1 o12;
> 	p2 o22;
> 	p3 o13;
> 	p3 o23.
> The ordering is not really meaningful, just nicer for the human that looks at it. So, this is basically how I'd like to have the data displayed to an end user.
> My problem is to transmit these data to a program in charge of creating a web page that displays them, and in charge also of publishing the RDF data for other programs (the RDF graph is the only thing that matters, as far as machines are concerned, except for the program in charge of displaying it to human users)
> I've been using RDFa, but it's difficult to have the people in charge of creating web pages to take care of that.
> I was hoping to transmit some JSON-LD that mimics the second form of the graph above, thinking that the web developer would then easily convert it to HTML, and include it in a script in order to also have the data published as data. Until I found that duplicate keys are not possible… (I know well RDF things, but I have little experience with JSON)
> Example of the data I'm working with:
> - in RDFa:
> http://uk.co.rplug.renault.com/product/model/87J/captur/c/A-87J-NAV3G3?embed=true
> - in turtle (not exactly the same data as above, but almost)
> http://uk.co.rplug.renault.com/product/model/87J/captur/c/A-87J-NAV3G3?as=ttl
> Best,
> fps
> Le 22 nov. 2014 à 18:37, Nicholas Bollweg <nick.bollweg@gmail.com> a écrit :
>> Can you help us with a few examples of what you are trying to represent? I am inclined to believe that @list might be your only way to get ordering without reimplementing it yourself!
>> Also, here's the ECMAScript discussion about duplicate keys:
>> https://esdiscuss.org/topic/json-duplicate-keys
>> The minutes at the end are actually quite informative about how things like this happen and the choices such committees have to make.

Received on Saturday, 22 November 2014 22:23:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:42 UTC