Re: [jackson-user] Problem pretty printing a String of Json

2016-10-14 Thread Tatu Saloranta
Java String just becomes JSON String value, that is, surrounded in double quotes and contents escaped if and as necessary. So to pretty-print, you need to parse JSON into a Java object structure, then write with pretty-printing. Something like: JsonNode root = mapper.readTree(input); String prett

[jackson-user] Problem pretty printing a String of Json

2016-10-14 Thread Serdyn du Toit
Hi, I'm having a problem getting a String of Json to "pretty print". After doing some cleanup of the String I can get it "pretty printed" using https://jsonformatter.curiousconcept.com/, so I think I'm just using the Jackson Api in the wrong way. Here is my code: @Test public void testToPret