Hi Santiago, On Wed, Jul 15, 2015 at 3:55 AM, Santiago Gonzalez Toral < hernangt12...@gmail.com> wrote: > > I there a way to query data in marmotta via web service and return it a > JSON-LD serialization ?. I looked at the sparql service module but it only > returns data as html, json and xml. >
The user interface to query SPARQL (based on Squebi) just present some formats to the user. But that does not mean the endpoint does not support other formats. One thing you should differentiate is the actual SPARQL endpoint (marmotta/sparl/select) from the user interface to query. In addition, for querying (updating is another story) SPARQL has two type of query: a) Those that return results (SELECT and ASK), that can be only represented in a resultset-like formal (XML, JSON, HTML. etc. b) Those that return graphs (CONTRUCT and DESCRIBE), that require a RDF format (RDF/XML, Turtle, JSON-LD, etc) to return the RDF graph. Therefore you can only get JSON-LD with the second type of queries. You have to request the right mimetype to the endpoint; using curl something like: curl --data-urlencode "query=CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o } LIMIT 10" -H "Accept: application/ld+json" http://example.org:8080/marmotta/sparl/select Hope that helps.. Further details in the query language http://www.w3.org/TR/sparql11-query/ and protocol http://www.w3.org/TR/sparql11-protocol/ specifications. Cheers, -- Sergio Fernández Partner Technology Manager Redlink GmbH m: +43 6602747925 e: sergio.fernan...@redlink.co w: http://redlink.co