Polymorphic Adapter
public final class PolymorphicAdapter<T extends Object> implements JsonDeserializer<T>, JsonSerializer<T>
Content copied to clipboard
Provides an adapter that stores the classname with the object being serialized. This allows for the object to be properly deserialized even when being serialized into a base class or interface.
Constructors
PolymorphicAdapter
Link copied to clipboard
Functions
deserialize
Link copied to clipboard
T deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
Content copied to clipboard