how to return SPARQL results in JSON format

70 views
Skip to first unread message

Vladimir Alexiev

unread,
Aug 17, 2017, 4:58:33 AM8/17/17
to Getty Vocabularies as Linked Open Data, Daniel Burckhardt
Daniel Burckhardt (SUR CH) wrote:

Since today, I have the problem that my SPARQL-selects for Getty Vocab no longer work. 

Though the http://vocab.getty.edu/doc/ says that tabular SPARQL formats are supported (and worked fine until yesterday):

 

curl -H "Accept: application/sparql-results+json" "http://vocab.getty.edu/sparql/?query=SELECT+%3FSubject+%7B+BIND%28tgn%3A1041311+as+%3FSubject%29+%7D"

 

now gives an error: Apache Tomcat/7.0.42 - Error report

 

(while the following still works)


curl -H "Accept: application/rdf+xml" "http://vocab.getty.edu/sparql/?query=SELECT+%3FSubject+%7B+BIND%28tgn%3A1041311+as+%3FSubject%29+%7D"

 

Is this something that can be fixed on your side or do I need to switch to a different SPARQL-Client library (EasyRDF which I use supports only application/sparql-results+json and application/sparql-results+xml?


--------


Hi Daniel! You can use the sparql.json endpoint and don't need to specify Accept (and you have an extraneous trailing slash in /sparql/):


curl "http://vocab.getty.edu/sparql.json?query=SELECT+%3FSubject+%7B+BIND%28tgn%3A1041311+as+%3FSubject%29+%7D"


This is mentioned in passing at http://vocab.getty.edu/doc/queries/#Geo_Chart_with_sgvizler but it's still a bug. 

I'll post it.


Reply all
Reply to author
Forward
0 new messages