Ordered list is parsed incorrectly
jakubklimek opened this issue · 0 comments
jakubklimek commented
When {"@container": "@list"}
is specified in JSON-LD @context
, which should generate an ordered rdf:List
, the output is incorrect.
Sample input:
{
"@context": {
"@vocab": "https://data.gov.cz/slovník/nkod/",
"resources": {
"@container": "@list"
}
},
"@type": "https://data.gov.cz/slovník/nkod/Data",
"https://data.gov.cz/slovník/nkod/data": {
"result": {
"resources": [{
"url": "http://services.cuzk.cz/shp/ku/epsg-2065/650374.zip",
"name": "650374",
"license_link": "http://www.cuzk.cz/Predpisy/Podminky-poskytovani-prostor-dat-a-sitovych-sluzeb.aspx",
"format": "application/x-shapefile",
"description": "Formát: SHP. Souřadný systém: neznámý."
}, {
"url": "http://services.cuzk.cz/shp/ku/epsg-5514/650374.zip",
"name": "650374",
"license_link": "http://www.cuzk.cz/Predpisy/Podminky-poskytovani-prostor-dat-a-sitovych-sluzeb.aspx",
"format": "application/x-shapefile",
"description": "Formát: SHP. Souřadný systém: S-JTSK."
}]
}
}
}
Notice that resources
is an array, which is specified as "@container": "@list" in
@context`. (It is actually a CKAN API response with a JSON-LD context).
The result in Turtle contains:
[] <https://data.gov.cz/slovník/nkod/resources> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>,
_:t-1543825855465-n7, _:t-1543825855465-n8;
Which is incorrect. It should be
[] <https://data.gov.cz/slovník/nkod/resources> _:b3 .
_:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b4 ;
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b5 .
_:b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b6 ;
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .