On 17/09/14 18:20, Bruno P. Kinoshita wrote:
Hello Dave,
You are definitely right. I wanted to give it a try before replying, so I
installed Fuseki, set up a simple PHP project and fired some queries which the
output was set to JSON. Not sure what would be done in JENA-632.
Thanks!
Bruno
There are currently three ways to get somekind of JSON out of SPARQL.
1/ SELECT and conneg for SPARQL Results in JSON
2/ CONSTRUCT/DESCRIBE and conneg for JSON-LD, or RDF/JSON
The idea behind JENA-632 is to have something like SELECT results but
output idiomatic JSON making it easier to consume by the application
making the SPARQL request.
A JSON array (or JSON object with one element which is a JSON array ...)
with each array item being made from the SPARQL result row, and each
array item being custom JSON objects.
See [1] -- I think "SELECT JSON" is a better name because it not an RDF
graph, it is an array of JSON results, one per row.
SELECT JSON
{
"name" : ?name ,
"email" : ?email
}
WHERE
{
?x a foaf:Person ;
foaf:name ?name ;
foaf:mbox ?email
}
and
[
{ "name" : "John" , "email" : "mailto:[email protected]" } ,
{ "name" : "Janet" , "email" : "mailto:[email protected]" }
]
is easy to work with.
Andy
[1] http://steveharris.tumblr.com/post/4590579712/construct-json
________________________________
From: Dave Reynolds <[email protected]>
To: [email protected]
Sent: Monday, September 15, 2014 6:54 AM
Subject: Re: Current status of JENA-632 (Generate JSON from SPARQL directly)
I can't speak to JENA-632 but if all you want to do is query and get
results back in *a* JSON format, rather than constructing some custom
format, then can't you use the standard application/sparql-results+json?
As in: http://www.w3.org/TR/rdf-sparql-json-res/
Dave
On 14/09/14 06:15, Bruno P. Kinoshita wrote:
Hi all,
What's the current status of JENA-632? I see it is unresolved/open/unassigned
but there are some comments there, it is well voted and many users are
participating.
I'm writing an application on top of Jena for a customer. The interface is
built with Semantic-UI and Backbone.JS, in PHP.
So far I have accessed Jena only via its SPARQL endpoint, but it would
definitely be a lot easier to receive the data formatted as JSON.
If there is nobody working on it ATM I'd like to spend some hours toying with
the code and some license-compatible libraries to produce a patch. Or if
someone would like to join, or has any suggestions :)
Thank you in advance!
Bruno