I'm using json-simple and I need to pretty-print JSON data (make it more human readable).
I haven't been able to find this functionality within that library.
How is this commonly achieved?
GSON can do this in a nice way:
Gson gson = new GsonBuilder().setPrettyPrinting().create(); JsonParser jp = new JsonParser(); JsonElement je = jp.parse(uglyJSONString); String prettyJsonString = gson.toJson(je);