Simple Solution
  • Java
  • Spring
  • Spring Boot
  • Tutorials
  • Tags
Generate Pretty Print JSON String in Java using Gson
Generate Pretty Print JSON String in Java using Gson

In this Java Gson tutorial we learn how to use the Gson library to generate a readable pretty print JSON String from a Java object. Via Java detail Java example we will show you how to use the GsonBuilder.setPrettyPrinting() method to configure Gson to output JSON String that fits in a page for pretty printing.

Convert Java Object to JSON String in Java using Gson
Convert Java Object to JSON String in Java using Gson

In this Java Gson tutorial we learn how to use the Gson library to convert a Java object to a JSON String using the Gson.toJson() method. Via step by step Java example we show you how to convert to a JSON String from a HashMap, a List of HashMap, a Java object or List of Java objects.

Copyright © 2019 SimpleSolution.dev. All Rights Reserved.