Class GsonMapper

java.lang.Object
com.intellectualsites.http.external.GsonMapper

public final class GsonMapper extends Object
Class containing mappers for Gson objects
  • Constructor Details

    • GsonMapper

      public GsonMapper()
  • Method Details

    • serializer

      @NotNull public static <T> @NotNull com.intellectualsites.http.external.GsonMapper.GsonSerializer<T> serializer(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull Gson gson)
      Create a new serializer
      Type Parameters:
      T - Input type
      Parameters:
      clazz - Input class
      gson - Gson instance
      Returns:
      Serializer for the input type
    • deserializer

      @NotNull public static <T> @NotNull com.intellectualsites.http.external.GsonMapper.GsonDeserializer<T> deserializer(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull Gson gson)
      Create a new deserializer
      Type Parameters:
      T - Output type
      Parameters:
      clazz - Output class
      gson - Gson instance
      Returns:
      Deserializer for the output type