spring-framework / org.springframework.http.converter.json / AbstractJackson2HttpMessageConverter / setPrettyPrint

setPrettyPrint

open fun setPrettyPrint(prettyPrint: Boolean): Unit

Whether to use the DefaultPrettyPrinter when writing JSON. This is a shortcut for setting up an ObjectMapper as follows:

 ObjectMapper mapper = new ObjectMapper(); mapper.configure(SerializationFeature.INDENT_OUTPUT, true); converter.setObjectMapper(mapper);