#example.sparql #============== PREFIX wgs: PREFIX q: CONSTRUCT { GRAPH eg:myGraph { ?s a q:BikeStation ; q:id ?id ; rdfs:label ?name ; wgs:long ?x ; wgs:lat ?y ; . } } { # url:text is a property function that fetches the content of subject URL and # makes it available as a SPARQL result set row via the object variable url:text ?src . BIND(json:parse(?src) AS ?json) . # Unnest each item of the json array into its own SPARQL result set row ?json json:unnest ?i . # For each row, craft the values for the CONSTRUCT template BIND("http://qrowd-project.eu/resource/" AS ?ns) BIND(json:path(?i, "$.id") AS ?id) BIND(URI(CONCAT(?ns, ENCODE_FOR_URI(?id))) AS ?s) BIND(json:path(?i, "$.name") AS ?name) BIND(json:path(?i, "$.position[0]") AS ?x) BIND(json:path(?i, "$.position[1]") AS ?y) }