When running on windows I always get "\r\n" in the output, but I was trying to just return "\n"
ObjectMapper objectMapper = new ObjectMapper();
return objectMapper.readTree("{\"key\":\"value\"}")
.toPrettyString();
Is there a easy way to achieve this?