Class GsonJsonSerializerBuilder

java.lang.Object
com.azure.core.serializer.json.gson.GsonJsonSerializerBuilder

public final class GsonJsonSerializerBuilder extends Object
Fluent builder class that configures and instantiates instances of GsonJsonSerializer.
  • Constructor Details

    • GsonJsonSerializerBuilder

      public GsonJsonSerializerBuilder()
  • Method Details

    • build

      public GsonJsonSerializer build()
      Constructs a new instance of GsonJsonSerializer with the configurations set in this builder.
      Returns:
      A new instance of GsonJsonSerializer.
    • serializer

      public GsonJsonSerializerBuilder serializer(com.google.gson.Gson gson)
      Sets the Gson that will be used during serialization.

      If this is set to null the default Gson will be used.

      Parameters:
      gson - Gson that will be used during serialization.
      Returns:
      The updated GsonJsonSerializerBuilder class.