Simple Solution
  • Java
  • Spring
  • Spring Boot
  • Tutorials
  • Tags
Java Gson exclude fields using @Expose annotation
Java Gson exclude fields using @Expose annotation

In this Java Gson tutorial we learn how to exclude fields during serialization or deserialize JSON to exclude fields based on @Expose annotation. Via step by step tutorial we will show you how to use the GsonBuilder.excludeFieldsWithoutExposeAnnotation() method to configure Gson to exclude fields without @Expose annotation.

Java Gson exclude fields with modifiers
Java Gson exclude fields with modifiers

In this tutorial we learn how to configure Gson to exclude fields during serialization or deserialize JSON to exclude fields with specific access modifiers. Via step by step example we will show you how to use the GsonBuilder.excludeFieldsWithModifiers() method to override Gson configuration to exclude fields by given modifiers.

Java Gson Read JSON File using JsonReader
Java Gson Read JSON File using JsonReader

In this Java Gson tutorial we learn how to use the com.google.gson.stream.JsonReader class of Gson library to read JSON file content.

Java Gson Write JSON File using JsonWriter
Java Gson Write JSON File using JsonWriter

In this Java Gson tutorial we learn how to use the JsonWriter class in the Gson library to write JSON content to file. Via different Java example programs we show you how to write a simple JSON object to file, a multi level JSON content or an array of objects to JSON file.

Java Gson Convert JSON String to JsonElement
Java Gson Convert JSON String to JsonElement

In This Java Gson tutorial we learn how to convert a JSON String into a com.google.gson.JsonElement object of the Gson library.

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

In this Java Gson tutorial we learn how to use the Gson library to convert a Java object into JSON file using the Gson.toJson() method with FileWriter. Via different Java program examples we show you how to convert a JSON file from an object of HashMap, ArrayList, an object of a custom defined class or a List of objects.

Java Convert classpath resource JSON File to Java Object using Gson
Java Convert classpath resource JSON File to Java Object using Gson

In this Java Gson tutorial, we show you how to read a JSON file from classpath resources and convert the JSON content to Java object using the Gson library and Apache Commons IO library. By different Java example programs we learn how to convert JSON content to a HashMap, a List of Map, an object of a custom defined class or a List of objects.

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

In this Java Gson tutorial we learn how to convert a JSON file into a Java object using the Gson class of the Gson library. By different Java example programs we show you how to convert a JSON file into a HashMap object, a list of Map, an object of custom defined classes or a List of objects.

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.

  • 1
  • 2
  • 3
  • …
  • 62
  • 63
  • 64
  • …
  • 99

Copyright © 2019 SimpleSolution.dev. All Rights Reserved.