Package net.minecraft.util
Class JsonSerializing.GsonSerializer<E,T extends JsonSerializableType<E>>
java.lang.Object
net.minecraft.util.JsonSerializing.GsonSerializer<E,T>
- All Implemented Interfaces:
JsonDeserializer<E>
,JsonSerializer<E>
- Enclosing class:
- JsonSerializing
static class JsonSerializing.GsonSerializer<E,T extends JsonSerializableType<E>> extends Object implements JsonDeserializer<E>, JsonSerializer<E>
- Mappings:
Namespace Name official def$c
intermediary net/minecraft/class_5330$class_5333
named net/minecraft/util/JsonSerializing$GsonSerializer
-
Field Summary
Fields Modifier and Type Field Description private com.mojang.datafixers.util.Pair<T,JsonSerializing.CustomSerializer<? extends E>>
elementSerializer
private T
field_28445
private String
idFieldName
private Registry<T>
registry
private String
rootFieldName
private Function<E,T>
typeIdentification
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description E
deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext)
JsonElement
serialize(E e, Type type, JsonSerializationContext jsonSerializationContext)
-
Field Details
-
registry
- Mappings:
Namespace Name Mixin selector official a
Ldef$c;a:Lgn;
intermediary field_25197
Lnet/minecraft/class_5330$class_5333;field_25197:Lnet/minecraft/class_2378;
named registry
Lnet/minecraft/util/JsonSerializing$GsonSerializer;registry:Lnet/minecraft/util/registry/Registry;
-
rootFieldName
- Mappings:
Namespace Name Mixin selector official b
Ldef$c;b:Ljava/lang/String;
intermediary field_25198
Lnet/minecraft/class_5330$class_5333;field_25198:Ljava/lang/String;
named rootFieldName
Lnet/minecraft/util/JsonSerializing$GsonSerializer;rootFieldName:Ljava/lang/String;
-
idFieldName
- Mappings:
Namespace Name Mixin selector official c
Ldef$c;c:Ljava/lang/String;
intermediary field_25199
Lnet/minecraft/class_5330$class_5333;field_25199:Ljava/lang/String;
named idFieldName
Lnet/minecraft/util/JsonSerializing$GsonSerializer;idFieldName:Ljava/lang/String;
-
typeIdentification
- Mappings:
Namespace Name Mixin selector official d
Ldef$c;d:Ljava/util/function/Function;
intermediary field_25200
Lnet/minecraft/class_5330$class_5333;field_25200:Ljava/util/function/Function;
named typeIdentification
Lnet/minecraft/util/JsonSerializing$GsonSerializer;typeIdentification:Ljava/util/function/Function;
-
field_28445
- Mappings:
Namespace Name Mixin selector official e
Ldef$c;e:Ldep;
intermediary field_28445
Lnet/minecraft/class_5330$class_5333;field_28445:Lnet/minecraft/class_5336;
named field_28445
Lnet/minecraft/util/JsonSerializing$GsonSerializer;field_28445:Lnet/minecraft/util/JsonSerializableType;
-
elementSerializer
@Nullable private final com.mojang.datafixers.util.Pair<T extends JsonSerializableType<E>,JsonSerializing.CustomSerializer<? extends E>> elementSerializer- Mappings:
Namespace Name Mixin selector official f
Ldef$c;f:Lcom/mojang/datafixers/util/Pair;
intermediary field_25201
Lnet/minecraft/class_5330$class_5333;field_25201:Lcom/mojang/datafixers/util/Pair;
named elementSerializer
Lnet/minecraft/util/JsonSerializing$GsonSerializer;elementSerializer:Lcom/mojang/datafixers/util/Pair;
-
-
Constructor Details
-
GsonSerializer
private GsonSerializer(Registry<T> registry, String rootFieldName, String idFieldName, Function<E,T> typeIdentification, @Nullable T t, @Nullable com.mojang.datafixers.util.Pair<T,JsonSerializing.CustomSerializer<? extends E>> elementSerializer)- Mappings:
Namespace Name Mixin selector official <init>
Ldef$c;<init>(Lgn;Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;Ldep;Lcom/mojang/datafixers/util/Pair;)V
intermediary <init>
Lnet/minecraft/class_5330$class_5333;<init>(Lnet/minecraft/class_2378;Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;Lnet/minecraft/class_5336;Lcom/mojang/datafixers/util/Pair;)V
named <init>
Lnet/minecraft/util/JsonSerializing$GsonSerializer;<init>(Lnet/minecraft/util/registry/Registry;Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;Lnet/minecraft/util/JsonSerializableType;Lcom/mojang/datafixers/util/Pair;)V
-
-
Method Details
-
deserialize
public E deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException- Specified by:
deserialize
in interfaceJsonDeserializer<E>
- Throws:
JsonParseException
- Mappings:
Namespace Name Mixin selector official deserialize
Ldef$c;deserialize(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Ljava/lang/Object;
intermediary deserialize
Lnet/minecraft/class_5330$class_5333;deserialize(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Ljava/lang/Object;
named deserialize
Lnet/minecraft/util/JsonSerializing$GsonSerializer;deserialize(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Ljava/lang/Object;
-
serialize
- Specified by:
serialize
in interfaceJsonSerializer<E>
- Mappings:
Namespace Name Mixin selector official serialize
Ldef$c;serialize(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;
intermediary serialize
Lnet/minecraft/class_5330$class_5333;serialize(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;
named serialize
Lnet/minecraft/util/JsonSerializing$GsonSerializer;serialize(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;
-