in Java when i use the
@Produces("application/json")
annotation the output is not formated into human readable form. How do i achive that?
Just for the record, if you want to enable the pretty output only for some resources you can use the @JacksonFeatures annotation on a resource method.
Here is example:
@Produces(MediaType.APPLICATION_JSON) @JacksonFeatures(serializationEnable = { SerializationFeature.INDENT_OUTPUT }) public Bean resource() { return new Bean(); }
1.4m articles
1.4m replys
5 comments
56.9k users