T - the target type to be produced by this Mapper (the target class may
contain Gson annotations for due mapping -- e.g.: @SerializedName)public class GsonJsonToObjectMapper<T> extends Object implements Mapper<T>
Mapper that loads the contents of a valid JSON Source
(e.g.: file, URL, string) into POJO (Plain Old Java Object), using Gson.
Additional details may be found at Gsons's official documentation.
| Constructor and Description |
|---|
GsonJsonToObjectMapper(Class<T> targetType)
Builds a new JSON mapper with the specified target type.
|
| Modifier and Type | Method and Description |
|---|---|
T |
apply(InputStream inputStream) |
ConfigurationHelper<T> |
configurationHelper(T object) |
public T apply(InputStream inputStream) throws IOException
apply in interface Mapper<T>IOExceptionpublic ConfigurationHelper<T> configurationHelper(T object)
configurationHelper in interface Mapper<T>Copyright © 2022. All rights reserved.