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
private static class JsonSerializing.GsonSerializer<E,T extends JsonSerializableType<E>>
extends Object
implements JsonDeserializer<E>, JsonSerializer<E>
- Mappings:
Namespace Name official drd$c
intermediary net/minecraft/class_5330$class_5333
named net/minecraft/util/JsonSerializing$GsonSerializer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(JsonElement json, Type type, JsonDeserializationContext context) serialize
(E object, Type type, JsonSerializationContext context)
-
Field Details
-
registry
- Mappings:
Namespace Name Mixin selector official a
Ldrd$c;a:Lhm;
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
Ldrd$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
Ldrd$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;
-
typeGetter
- Mappings:
Namespace Name Mixin selector official d
Ldrd$c;d:Ljava/util/function/Function;
intermediary field_25200
Lnet/minecraft/class_5330$class_5333;field_25200:Ljava/util/function/Function;
named typeGetter
Lnet/minecraft/util/JsonSerializing$GsonSerializer;typeGetter:Ljava/util/function/Function;
-
defaultType
- Mappings:
Namespace Name Mixin selector official e
Ldrd$c;e:Ldrn;
intermediary field_28445
Lnet/minecraft/class_5330$class_5333;field_28445:Lnet/minecraft/class_5336;
named defaultType
Lnet/minecraft/util/JsonSerializing$GsonSerializer;defaultType:Lnet/minecraft/util/JsonSerializableType;
-
elementSerializer
@Nullable private final @Nullable com.mojang.datafixers.util.Pair<T extends JsonSerializableType<E>,JsonSerializing.ElementSerializer<? extends E>> elementSerializer- Mappings:
Namespace Name Mixin selector official f
Ldrd$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
GsonSerializer(Registry<T> registry, String rootFieldName, String idFieldName, Function<E, T> typeGetter, @Nullable T defaultType, @Nullable @Nullable com.mojang.datafixers.util.Pair<T, JsonSerializing.ElementSerializer<? extends E>> elementSerializer) - Mappings:
Namespace Name Mixin selector official <init>
Ldrd$c;<init>(Lhm;Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;Ldrn;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 json, Type type, JsonDeserializationContext context) throws JsonParseException - Specified by:
deserialize
in interfaceJsonDeserializer<E>
- Throws:
JsonParseException
- Mappings:
Namespace Name Mixin selector official deserialize
Ldrd$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
Ldrd$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;
-