GitHub user kinow opened a pull request:

    https://github.com/apache/jena/pull/114

    JENA-632: Generate JSON from SPARQL directly

    This pull request contains code for 
[JENA-632](https://issues.apache.org/jira/browse/JENA-632). The original work 
is still in a branch in [my fork of 
Jena](https://github.com/apache/jena/compare/master...kinow:JENA-632). It has 
been updated after the work on Jena 3 (mainly package renaming). And the web 
layer has been implemented in fuseki 2, but not backported to fuseki 1.
    
    Besides reviewing the code, the follow steps can be used to quickly test 
the code.
    
    * Start Fuseki (debug in Eclipse after checking out this branch, for 
example)
    * Load the books.ttl from fuseki1/Data directory
    * Query with something as
    
    ```
    PREFIX purl: <http://purl.org/dc/elements/1.1/>
    PREFIX w3: <http://www.w3.org/2001/vcard-rdf/3.0#> 
    PREFIX : <http://example.org/book/> 
    
    JSON {
    "author": ?author, 
    "title": ?title 
    }
    WHERE 
    {
    ?book purl:creator ?author .
    ?book purl:title ?title . 
    FILTER (?author = 'J.K. Rowling')
    }
    ```
    
    Which follows the syntax proposed in the issue in JIRA.
    
    I am still reviewing the code after porting to the new code base, but an 
extra pair of eyes reviewing it is always welcome! :grin: 
    
    ps: the SPARQL editor may need some tweaking to support the new syntax
    
    ps2: tried to change the key name in the JSON query but it didn't work. 
Will try to update the PR if that's really a bug in the code in the next days

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kinow/jena JENA-632-2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jena/pull/114.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #114
    
----
commit 0049f2abcb757c9a190e0017d9369583f4eebf93
Author: Bruno P. Kinoshita <[email protected]>
Date:   2015-12-27T10:51:24Z

    JENA-632: Generate JSON from SPARQL directly

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to