W3C home > Mailing lists > Public > public-rdf-wg@w3.org > July 2013

Re: Updated JSON-LD spec to more closely align w/ RDF data model

From: Andy Seaborne <andy@apache.org>
Date: Thu, 04 Jul 2013 21:21:00 +0100
Message-ID: <51D5D92C.80506@apache.org>
To: public-rdf-wg@w3.org
>> As the tail of a list is a list in its own right, the discussion about
>> addition triples on the first element "just" means the first element
>> needs encoding differently - the rest of the list is a @list isn't it
>> (I have not checked the algorithm does this).
> The algorithm currently doesn't support this as it would make it
> considerably more complex to find *the* head of the list.

The set of all heads of well-formed lists can be found quite easily.

All lists have a common tail (rdf:nil).  Just walk back up the list 
checking nodes have exactly one rdf:first and one rdf:next triple.  This 
generates the list head.

So in initialization of processing a graph is to run this finder and get 
the set of all list heads.

This can be used to determine which nodes to process as @list and which 
to process as plain triples.

(Actually it's probably easier to run the algorithm, collecting all 
triples in well-formed lists, then run conversion on the set of triples 
which is the graph minus list triples)

Received on Thursday, 4 July 2013 20:21:30 UTC

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