Jackson version: 2.14.1
In ObjectMapper case, we can do the following:
objectMapper.setDefaultPrettyPrinter(new DefaultPrettyPrinter().withObjectIndenter(new DefaultIndenter().withLinefeed("\n")));
However in XmlMapper. the default implementation Lf2SpacesIndenter
- Is protected
- Doesn't seem to support a custom line separator
Does it mean we need to provide our own implementation of Indenter just to have a different line separator?