If one returns a JSON Array and try to pretty print it there is an error:
java.io.IOException: javax.json.stream.JsonParsingException: JsonParser#getObject() or JsonParser#getObjectStream() is valid only for START_OBJECT parser state. But current parser state is START_ARRAY
at org.takes.rs.RsPrettyJson.transform(RsPrettyJson.java:117)
at org.takes.rs.RsPrettyJson.make(RsPrettyJson.java:92)
at org.takes.rs.RsPrettyJson.head(RsPrettyJson.java:74)
at org.takes.rs.RsWrap.head(RsWrap.java:58)
at org.takes.rs.RsPrint.printHead(RsPrint.java:132)
at org.takes.rs.RsPrint.print(RsPrint.java:117)
at org.takes.http.BkBasic.print(BkBasic.java:123)
at org.takes.http.BkBasic.accept(BkBasic.java:99)
at org.takes.http.BkSafe.lambda$new$0(BkSafe.java:46)
at org.takes.http.BkWrap.accept(BkWrap.java:51)
at org.takes.http.FtBasic.loop(FtBasic.java:113)
at org.takes.http.FtBasic.start(FtBasic.java:99)
beside that it would be useful if one can pass directly a JsonStructure to avoid the additional parsing of the body.
If one returns a JSON Array and try to pretty print it there is an error:
beside that it would be useful if one can pass directly a
JsonStructure
to avoid the additional parsing of the body.