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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Google’s GSON can do this in a nice way:
or since it is now recommended to use the static parse method from JsonParser you can also use this instead:
Here is the import statement:
Here is the Gradle dependency: