W3C home > Mailing lists > Public > public-linked-json@w3.org > May 2013

Conversion of lists of lists to JSON-LD

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Wed, 1 May 2013 20:24:03 +0200
To: "'Linked JSON'" <public-linked-json@w3.org>
Cc: "'RDF WG'" <public-rdf-wg@w3.org>
Message-ID: <00d001ce4699$104570d0$30d05270$@lanthaler@gmx.net>
The current algorithms in the JSON-LD spec do not support the conversion of
list of lists to JSON-LD. This is a "Feature at risk" [1].

I've just updated my implementation to support the conversion of lists of
lists. The nested lists don't use the @list-construct because that would
result in invalid in JSON-LD. Instead they remain simple nodes with
rdf:first/rdf:rest properties.

I also fixed a number of other bugs, e.g., properties other than
rdf:first/rdf:rest are being lost for list nodes in the currently specified
algorithm. It also converts lists identified by a IRI and thus looses the

The new algorithm is, IMO at least, simpler than the current one. It's not
dramatically different but I've, e.g., got rid of the list map and instead
navigate the node map directly. If you are interested, you can find the diff
at [2].

Unless someone objects, I will update the algorithm in the spec and add a
couple of test cases.

[1] http://www.w3.org/TR/json-ld-api/#convert-from-rdf-algorithm


Markus Lanthaler
Received on Wednesday, 1 May 2013 18:24:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:53:21 UTC