W3C home > Mailing lists > Public > public-rdf-comments@w3.org > July 2014

RE: Converting RDF to JSON-LD : shared lists between graphs

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Tue, 22 Jul 2014 22:58:44 -0700
To: "'Peter Ansell'" <ansell.peter@gmail.com>, "'Andy Seaborne'" <andy@apache.org>
Cc: "'Linked JSON'" <public-linked-json@w3.org>, <public-rdf-comments@w3.org>
Message-ID: <021001cfa63b$2b7bf920$8273eb60$@gmx.net>
Hi Andy,

On 22 Jul 2014 at 16:28, Peter Ansell wrote:
> On 22 July 2014 19:21, Andy Seaborne <andy@apache.org> wrote:
>> We are encountering an issue when converting RDF Datasets to JSON-LD.
>> 
>> The problem is with blank nodes that are shared between graphs and lists.
>> 
[...]
>> 
>> But as we understand the conversion algorithm, section 4 only considers each
>> graph in turn and so does not see the cross graph sharing.
>> 
>> Is this a correct reading of the spec text?

Yes, it is.


>> Part 4 of the conversion algorithm has
>> "For each name and graph object in graph map: "
>> 
>> so 4.3.3.* walks back up the list in one graph only.
>> 
>> 
>> There is no _:b1 in :G to refer to because the algorith generated @list and
>> its implicit bNodes don't have labels.
>> This is a different dataset with no shared bNode.
>> 
>> If it is all the same graph (s/:G1/:G/), the RDF dataset structure is
>> correctly serialized.
>> 
>>         Andy
> 
> Just to add a reference from RDF-1.1 that may be relevant:
> 
> "Blank nodes can be shared between graphs in an RDF dataset."
> 
> http://www.w3.org/TR/rdf11-concepts/#section-dataset
> 
> The RDF dataset to JSON-LD algorithm doesn't seem to allow for that right now.

Yeah, this is clearly a bug. I've added it to the JSON-LD API errata [1] and also filed a issue on our GitHub repo [2].


Thanks for reporting this,
Markus


[1] http://www.w3.org/2014/json-ld-errata
[2] https://github.com/json-ld/json-ld.org/issues/357



--
Markus Lanthaler
@markuslanthaler
Received on Wednesday, 23 July 2014 05:59:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:59:45 UTC