Open relu91 opened 6 years ago
Hi, I have the same issue when I setted up the blazegraph and used it as a RESTful API. It cannot recognize application/sparql-results+json
as format
. When I change to "format=json", it can work when testing it in the browser. However, it still cannot work when you use it as an Ajax
query in Javascript. See below:
query += "Select * where {?s ?p ?o.} limit 10";
// this does not work
// var url = _SPARQL_ENDPOINT + "?query=" + encodeURIComponent(query) + "&format=" + encodeURIComponent("application/sparql-results+json") + "&timeout=5000&debug=on";
// this URL can work on brower but not in ajax.
var url = _SPARQL_ENDPOINT + "?query=" + encodeURIComponent(query) + "&format=" + encodeURIComponent("json") + "&timeout=5000&debug=on";
$.ajax({
url: url,
type: 'GET',
dataType: 'json',
success: function(data, textStatus, xhr) {
console.log(data);
}
});
Any idea about this?
Blazegraph can't recognize query format parameter value: application/sparql-results+json. Even if the REST API documentation clearly states:
Console output:
WARN : ConnegUtil.java:139: Unknown value for QUERY PARAMETER: format passed application/sparql-results+json. Defaulting to XML
Looking at ConnegUtil the application/sparql-results-json is not in the switch case list, but sparql-result+json is present instead.