Conversion of lists of lists to JSON-LD

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
IRI.

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
[2]
https://github.com/lanthaler/JsonLD/commit/80d7cbdd65b6a6f2e5e02a3e5e14db36a
06655e6


Cheers,
Markus



--
Markus Lanthaler
@markuslanthaler

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