[
https://issues.apache.org/jira/browse/ANY23-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16458209#comment-16458209
]
Julio Caguano commented on ANY23-231:
-------------------------------------
If we don't use JSON-LD, we would need to give a response in a pretty JSON
format. In addition, the null that you get are the in the datatypes?
For example:
{code}
{ "type" : "literal", "value" : "language literal", "lang" : "en", "datatype" :
null }{code}
I was thinking in using a wrapper in
[JSONWriterFactory|https://github.com/apache/any23/blob/master/core/src/main/java/org/apache/any23/writer/JSONWriterFactory.java].
It can return this:
{code:java}
public FormatWriter getRdfWriter(OutputStream os) {
return new JSONPrettyWriter(new JSONWriter(os));
}
{code}
What do you think? If you think JSON-LD or the wrapper are not good enough, can
you point me out where the _ PrintStream_ from JSONWriter is called before it
is converted to String since the Servlet returns a String.
> Make JSON Reporting output pretty print
> ---------------------------------------
>
> Key: ANY23-231
> URL: https://issues.apache.org/jira/browse/ANY23-231
> Project: Apache Any23
> Issue Type: Improvement
> Components: core, service
> Affects Versions: 1.0
> Reporter: Lewis John McGibbney
> Priority: Minor
> Fix For: 2.3
>
>
> Right now if and when I use the Any23 REST API I am receiving bad output when
> I try to write to JSON e.g. the output is appauling.
> It is so very difficult to interpret and at times when I try to past it into
> a simple JSON formtter... it returns "null".
> I would really like to fix this.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)