[ 
https://issues.apache.org/jira/browse/JENA-632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15086179#comment-15086179
 ] 

ASF GitHub Bot commented on JENA-632:
-------------------------------------

Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/114#discussion_r49002105
  
    --- Diff: jena-arq/Grammar/master.jj ---
    @@ -327,6 +359,35 @@ void AskQuery() : {}
       SolutionModifier()
     }
     
    +void JsonQuery() : {}
    +{
    +  JsonClause()
    +  ( DatasetClause() )*
    +  WhereClause()
    +  SolutionModifier()
    +}
    +
    +void JsonClause() : { Object o ; String s ; }
    +{
    +  <JSON> { getQuery().setQueryJsonType() ; }
    +  <LBRACE>
    +  s = String() < PNAME_NS >
    +  (
    --- End diff --
    
    Yes - javacc will tokenize to PNAME_NS.  These is no COLON and if there 
were, theer would be other problems.
    
    I have a devious idea!
    
    Use the  PNAME_NS and follow with a java fragment that does additional 
checking:
    ```
       t = <PNAME_NS>
       { 
           if ( t.image is not exactly a ":" )
              throwParseException("message",  t.beginLine, t.beginColumn)
       }
    ```
    This then restricts the legal token and means you won't to have to play 
complicated games with javacc to switch to a different token set (if that is 
even possible due to lookahead of characters).



> Generate JSON from SPARQL directly.
> -----------------------------------
>
>                 Key: JENA-632
>                 URL: https://issues.apache.org/jira/browse/JENA-632
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: ARQ, Fuseki
>            Reporter: Andy Seaborne
>            Assignee: Bruno P. Kinoshita
>            Priority: Minor
>              Labels: java, javacc
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The capability to generate JSON directly from a SPARQL (or extended SPARQL) 
> query would enable the creation of JSON data API over published linked data.
> This project would cover:
> # Design and publication of a design.
> # Refinement of design based on community feed
> # Implementation, including testing.
> # Refinement of implementation based on community feed
> Skills required: Java, some parser work, design and discussion with the user 
> community, basic understanding of HTTP and content negotiation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to