Github user kinow commented on a diff in the pull request:
https://github.com/apache/jena/pull/114#discussion_r184510334
--- 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 --
Patch applied! Thanks Andy! TIL learned about that Prologue object.
Regarding the indentation, in `QuerySerializer.java`, there are other 2
occurrences of `incIndent`/`decIndent`, but instead of using `4`, they use the
class constant
`static final int BLOCK_INDENT = 2 ;`
Should we use that for JSON as well?
Thanks!!!
---