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

    https://github.com/apache/jena/pull/114#discussion_r109143318
  
    --- 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 --
    
    Replying to my previous comment. The reason why we are not using COLON, is 
that we get this error:
    
    ```
    [2017-04-01 00:44:24] Fuseki     INFO  [1] Query = JSON { "name" : ?name } 
WHERE { ?name ?a ?b } LIMIT 2
    [2017-04-01 00:44:24] Fuseki     INFO  [1] 400 Parse error: 
    JSON { "name" : ?name } WHERE { ?name ?a ?b } LIMIT 2
    
    Encountered " <PNAME_NS> ": "" at line 1, column 15.
    Was expecting:
        ":" ...
         (27 ms)
    ```
    
    The PNAME_NS (which is <PNAME_NS: (<PN_PREFIX>)? ":" >) matches the colon, 
probably for the default namespace declaration. And probably because PNAME_NS 
is declared before COLON.
    
    Maybe moving COLON before PNAME_NS, and using COLON in the PNAME_NS rule 
declaration? Not sure if that could introduce other unwanted bugs.
    
    For the time being going with Andy's suggestion to indicate when we were 
expecting a COLON, and actually have something matching PNAME_NS.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to