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 dim$c
intermediary net/minecraft/class_5330$class_5333
named net/minecraft/util/JsonSerializing$GsonSerializer
  • Field Details

    • registry

      private final Registry<T extends JsonSerializableType<E>> registry
      Mappings:
      Namespace Name Mixin selector
      official a Ldim$c;a:Lgw;
      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

      private final String rootFieldName
      Mappings:
      Namespace Name Mixin selector
      official b Ldim$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

      private final String idFieldName
      Mappings:
      Namespace Name Mixin selector
      official c Ldim$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

      private final Function<E,​T extends JsonSerializableType<E>> typeIdentification
      Mappings:
      Namespace Name Mixin selector
      official d Ldim$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

      @Nullable private final T extends JsonSerializableType<E> field_28445
      Mappings:
      Namespace Name Mixin selector
      official e Ldim$c;e:Ldiw;
      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 @Nullable com.mojang.datafixers.util.Pair<T extends JsonSerializableType<E>,​JsonSerializing.CustomSerializer<? extends E>> elementSerializer
      Mappings:
      Namespace Name Mixin selector
      official f Ldim$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

  • Method Details

    • deserialize

      public E deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException
      Specified by:
      deserialize in interface JsonDeserializer<E>
      Throws:
      JsonParseException
      Mappings:
      Namespace Name Mixin selector
      official deserialize Ldim$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

      public JsonElement serialize(E object, Type type, JsonSerializationContext context)
      Specified by:
      serialize in interface JsonSerializer<E>
      Mappings:
      Namespace Name Mixin selector
      official serialize Ldim$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;