public static class JsonSerializing.TypeHandler<E,T extends JsonSerializableType<E>> extends Object
When the root element read is an object, the handler obtains the type from registry to handle reading; otherwise, it falls back to custom logic.
Modifier and Type | Field and Description |
---|---|
private com.mojang.datafixers.util.Pair<T,JsonSerializing.CustomSerializer<? extends E>> |
customSerializer |
private String |
idFieldName |
private Registry<T> |
registry |
private String |
rootFieldName |
private Function<E,T> |
typeIdentification |
private final Registry<T extends JsonSerializableType<E>> registry
private final String rootFieldName
private final String idFieldName
private final Function<E,T extends JsonSerializableType<E>> typeIdentification
@Nullable private com.mojang.datafixers.util.Pair<T extends JsonSerializableType<E>,JsonSerializing.CustomSerializer<? extends E>> customSerializer
public Object createGsonSerializer()