-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON+LD/RDF serialization of SPARQL queries #4
Comments
why would one not handle this through simple content negotiation? as demonstrated there, each - including the execution reports, entails its own request. |
Related work : SPARQL.js as a JSON (not LD) representation of SPARQL queries : https://github.com/RubenVerborgh/SPARQL.js |
Related work: SSE (sparql query algebra), eg
|
Some more related work:
|
Would it be acceptable to require clients to compile the structured syntax of SPARQL queries to plain text? That way this change could be introduced gradually, starting without changes in the SPARQL 1.1 Protocol. A few years ago I wrote a post exploring several ways how to generate SPARQL. Now I'm leaning on using a data DSL, using a common data format, such as JSON, which maps to native data structures in mainstream programming languages. SPIN RDF or other RDF syntaxes are a bit cumbersome, because the syntax of SPARQL requires explicit ordering that is clumsy to represent and manipulate in RDF. |
I agree that exchanging a query in a structured format rather than just a string would be beneficial in many cases (e.g., to put the parsed (maybe implicitly changed) query into the query result, maybe also as a basis for execution plans, etc. for debugging and other purposes). I however don't think that this should be limited to or favor RDF/JSON-LD. |
Upto now SPARQL has been defined as a string of characters. However, there is a wish for an easier to manipulate format of queries.
Why?
It is currently difficult to give back feedback to users regarding how their query was executed and can be improved. Systems that do this need to patch query strings, which even for simple cases like automatically adding OFFSET and LIMIT clauses in the right place of a query string is not straight forward.
This feature would be basic building block for sharing query execution plans as an RDF/JSON+LD query object can be extended to as in the strawman example below that there is an error and the kind of join type planned by the DB.
The basics can be build from the SPARQL algebra model.
The desire for a JSON+LD model is so that it can be embedded in a application/sparql-results+json(+ld) result set.
Previous work
The SPIN notation has an notation for SPARQL in RDF.
Considerations for backward compatibility
SPARQL 1.0 and 1.1 only understand a query string, and do not expect JSON or RDF in a query field.
Suggestion is to add a new standard form parameter e.g. rdfquery for the http protocol.
Extending the formats of application/sparql-results with new fields can break many clients in the field.
The text was updated successfully, but these errors were encountered: