Closed
Description
PRETTY_PRINT_OUTPUT with composer doesn't work. I tried both 2.7.1 and 2.5. It doesn't do the pretty print
code:
String json = JSON.std
.with(JSON.Feature.PRETTY_PRINT_OUTPUT)
.composeString()
.startObject()
.put("a", 1)
.startArrayField("arr")
.add(1).add(2).add(3)
.end()
.startObjectField("ob")
.put("x", 3)
.put("y", 4)
.startArrayField("args").add("none").end()
.end()
.put("last", true)
.end()
.finish();
System.out.println(json);
Output:
{"a":1,"arr":[1,2,3],"ob":{"x":3,"y":4,"args":["none"]},"last":true}
Metadata
Metadata
Assignees
Labels
No labels