What is a good way to return SPARQL query results in JSON-LD, preferably staying close to the standardized JSON format? Can JSON-LD be returned for every query or only for certain query types?
An example of a SPARQL query result in JSON format (i.e., without JSON-LD enrichment):
{
"head": {"vars": ["s", "p", "o" ]},
"results": {
"bindings": [
{
"s": {
"type":"uri",
"value":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
},
"p": {
"type":"uri",
"value":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
},
"o": {
"type":"uri",
"value":"http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"
}
}
]
}
}