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

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:17 UTC