I have JsonNode result that I want to print out. So far, I am using:
ObjectMapper mapper = new ObjectMapper();
mapper.enable(SerializationFeatur
You can setup a custom DefaultPrettyPrinter using this:
DefaultPrettyPrinter pp = new DefaultPrettyPrinter();
pp.indentObjectsWith(new Lf2SpacesIndenter());
pp.indentArraysWith(new Lf2SpacesIndenter("\r\n"));
mapper.writer(pp).writeValue(new FileOutputStream(outputFile), resultNode);
Take a look at the method provided by DefaultPrettyPrinter HERE