Class GsonMapper
java.lang.Object
com.intellectualsites.http.external.GsonMapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NotNull com.intellectualsites.http.external.GsonMapper.GsonDeserializer<T>deserializer(@NotNull Class<T> clazz, @NotNull Gson gson)Create a new deserializerstatic <T> @NotNull com.intellectualsites.http.external.GsonMapper.GsonSerializer<T>serializer(@NotNull Class<T> clazz, @NotNull Gson gson)Create a new serializer
-
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 classgson- 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 classgson- Gson instance- Returns:
- Deserializer for the output type
-