T
- The type of the object created by deserialization.public class TypeConverterGsonDeserializer<T> extends Object implements com.google.gson.JsonDeserializer<T>
JsonDeserializer
deserializing a JsonPrimitive
to an object of type T
using
the given TypeConverter
.Constructor and Description |
---|
TypeConverterGsonDeserializer(ConverterT typeConverter)
Creates a deserializer with the given String-converter.
|
Modifier and Type | Method and Description |
---|---|
T |
deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
public TypeConverterGsonDeserializer(ConverterT typeConverter)
ConverterT
- The type of the converter to be used.typeConverter
- The converter to deserialize the JSON String.@Nullable public T deserialize(@Nonnull com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
deserialize
in interface com.google.gson.JsonDeserializer<T>
com.google.gson.JsonParseException
Copyright © 2020 SAP SE. All rights reserved.