SyntaxFix
Write A Post
Hire A Developer
Questions
The simplest and also the most compact solution (for v2.3.3):
ObjectMapper mapper = new ObjectMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); mapper.writeValueAsString(obj)