Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordered list is parsed incorrectly #52

Open
jakubklimek opened this issue Dec 3, 2018 · 0 comments
Open

Ordered list is parsed incorrectly #52

jakubklimek opened this issue Dec 3, 2018 · 0 comments

Comments

@jakubklimek
Copy link

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> .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant