[
https://issues.apache.org/jira/browse/JENA-632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16456138#comment-16456138
]
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_r184631233
--- 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 --
Sorry about the patch - I couldn't figure how to clone your repo because GH
did not like the fact I already had a repo called "jena". Yes, a constant is
better. I thought that 4 looked nicer than 2 and it does not get indented
further. Just use `incIndent` twice!
> 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
(v7.6.3#76005)