Pretty print JSON output of Spring Boot Actuator endpoints Pretty print JSON output of Spring Boot Actuator endpoints json json

Pretty print JSON output of Spring Boot Actuator endpoints


As per http://docs.spring.io/spring-boot/docs/current/reference/html/howto-spring-mvc.html#howto-customize-the-jackson-objectmapper, the official way to enable pretty print with Jackson in Spring Boot (1.2.2 at least) is to set the following property:

 # Pretty-print JSON responses spring.jackson.serialization.indent_output=true


For Spring Boot 1.5.1 I have in my YML file:

spring:  jackson:    serialization:      INDENT_OUTPUT: true

@BertrandRenuart answer was the closest, but by IDE did not see indent_output as correct.


The "http.mappers" property works for me but I think you might need it camel cased ("jsonPrettyPrint").