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

    https://github.com/apache/jena/pull/114#discussion_r184495709
  
    --- Diff: 
jena-arq/src/main/java/org/apache/jena/sparql/serializer/QuerySerializer.java 
---
    @@ -142,7 +144,19 @@ public void visitAskResultForm(Query query)
             out.print("ASK") ;
             out.newline() ;
         }
    -    
    +
    +    @Override
    +    public void visitJsonResultForm(Query query) {
    +        out.print("JSON {");
    +        List<String> terms = new ArrayList<>();
    +        for (Map.Entry<String, Object> entry : 
query.getJsonMapping().entrySet()) {
    --- End diff --
    
    Some suggestions for formatting output:
    
    - Use format utils to get pretty forms
    - Print JSON vertically so that long templates go down not off the 
right-hand side.
    
    I had to catch the prologue for formatting as it is formatted. Adding a 
"JSON formatter" seems like a very heavy way to do it.
    
    Patch from your JENA-632-2 branch:
    
    
[jena-632-2-afs.txt](https://github.com/apache/jena/files/1952543/jena-632-2-afs.txt)



---

Reply via email to