-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add a standardized extension of SPARQL 1.1 Query Results JSON format #13
Comments
Can the result be JSON-LD please ? :-) |
It would certainly be interesting to look at extending JSON-LD to cover RDF* triples as well, but note that what we are talking about here is a JSON format for a tabular query result, not for RDF data. As such, I don't immediately see how we could make this particular format a JSON-LD format. |
I agree with @jeenbroekstra. As a side note, work on JSON-LD for RDF* has already started: https://json-ld.github.io/json-ld-star/ |
@jeenbroekstra wrote:
Half a decade ago quite a bit of effort went into creating a set of W3C Recommendations enabling conversions from tabular data to RDF: I think this work can and should be used to enable the new SPARQL version to output JSON-LD (or JSON-LD*) and not just JSON. This first of all requires a JSON-LD context - which could become part of the new SPARQL specification. |
There may well be a use case for what you propose, a more comprehensibly enriched JSON-LD format for SPARQL tabular query results, and I'be interested to see a proposal to that effect. I do note, however, that having such a format is not contingent on the availability of RDF* in the data. As such, it is out of scope for the issue proposed here, which is purely about a minimal syntactical extension of a specific standard JSON format to enable carrying query results involving RDF* data. We need this to be minimal to allow low-effort uptake by various implementors (i.e. a simple adjustment of the currently existing parser/writer code in various software packages). Adding JSON-LD into the mix makes the effort of supporting the proposed format that much harder (it effectively will require a completely new parser/writer implementation for most software packages), and will hamper uptake. I suggest that you open a separate github issue (either here or perhaps more appropriately over at the SPARQL 1.2 community group, since this idea does not seem specific to RDF* to me) about formulating a JSON-LD format for tabular SPARQL query results. |
Not necessarily. Ideally only a JSON-LD context needs to be added. But that would need to be looked at closer.
Done: w3c/sparql-dev#125 |
This was solved a while ago by #39 |
(related issue: #12)
The result of a SPARQL SELECT query is serialized in JSON using the SPARQL 1.1 Query Results JSON format. This format will need to be extended to deal with the RDF* triple being a new possible value type for a binding. For example, the result of a query where variable
?a
is bound to an RDF* triple:<<<http://example.org/bob> <http://xmlns.com/foaf/0.1/age> 23>>
<http://example.org/certainty>
0.9
Currently, different implementations all have their own, slightly diverging, extensions. For example, in Eclipse RDF4J, the extension looks as follows:
In Apache Jena, the extension looks as follows:
In Stardog, the format extension as currently implemented is as follows:
In summary, Jena and RDF4J differ only by the names of the keys inside the new RDF*
triple
type (s
vssubject
,p
vsproperty
, etc). Stardog deviates slightly more in that it does not wrap the individual components of the RDF* triple into avalue
.Other implementations may have yet other, slightly deviant variants. This makes it difficult to process query results from different endpoint implementations. A single recommended extension would be a benefit for parser implementors and users alike.
The text was updated successfully, but these errors were encountered: