-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pretty print the JSON response #4
Comments
Documented config that enables pretty JSON - closes #4
Setting @Singleton
static class ObjectMapperBeanEventListener implements BeanCreatedEventListener<ObjectMapper> {
@Override
public ObjectMapper onCreated(BeanCreatedEvent<ObjectMapper> event) {
final ObjectMapper objectMapper = event.getBean();
DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();
prettyPrinter.indentArraysWith(DefaultIndenter.SYSTEM_LINEFEED_INSTANCE);
objectMapper.setDefaultPrettyPrinter(prettyPrinter);
return objectMapper;
}
} References: |
Customized the pretty printer to indent arrays - closes #4
No description provided.
The text was updated successfully, but these errors were encountered: