Package net.minecraft.util
Class JsonHelper
java.lang.Object
net.minecraft.util.JsonHelper
- Mappings:
Namespace Name official rcintermediary net/minecraft/class_2145named net/minecraft/util/JsonHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonArrayasArray(JsonElement element, String name) static booleanasBoolean(JsonElement element, String name) static floatasFloat(JsonElement element, String name) static intasInt(JsonElement element, String name) static ItemasItem(JsonElement element, String name) static JsonObjectasObject(JsonElement element, String name) static StringasString(JsonElement element, String name) static <T> Tdeserialize(Gson gson, Reader reader, Class<T> class2) static <T> Tdeserialize(Gson gson, Reader reader, Class<T> class2, boolean lenient) static <T> Tdeserialize(Gson gson, Reader content, Type type) static <T> Tdeserialize(Gson gson, Reader reader, Type type, boolean lenient) static <T> Tdeserialize(Gson gson, String content, Class<T> class2) static <T> Tdeserialize(Gson gson, String content, Class<T> class2, boolean lenient) static <T> Tdeserialize(Gson gson, String content, Type type) static <T> Tdeserialize(Gson gson, String content, Type type, boolean lenient) static <T> Tdeserialize(JsonElement element, String name, JsonDeserializationContext context, Class<? extends T> type) static <T> Tdeserialize(JsonObject object, String element, JsonDeserializationContext context, Class<? extends T> type) static <T> Tdeserialize(JsonObject object, String element, T defaultValue, JsonDeserializationContext context, Class<? extends T> type) static JsonArraygetArray(JsonObject object, String element) static JsonArraygetArray(JsonObject object, String name, JsonArray defaultArray) static booleangetBoolean(JsonObject object, String element) static booleangetBoolean(JsonObject object, String element, boolean defaultBoolean) static floatgetFloat(JsonObject object, String element) static floatgetFloat(JsonObject object, String element, float defaultFloat) static intgetInt(JsonObject object, String element) static intgetInt(JsonObject object, String element, int defaultInt) static ItemgetItem(JsonObject object, String element) static JsonObjectgetObject(JsonObject object, String element) static JsonObjectgetObject(JsonObject object, String element, JsonObject defaultObject) static StringgetString(JsonObject object, String element) static StringgetString(JsonObject object, String element, String defaultStr) static StringgetType(JsonElement element) static booleanhasArray(JsonObject object, String element) static booleanhasBoolean(JsonObject object, String element) static booleanhasElement(JsonObject object, String lement) static booleanhasPrimitive(JsonObject object, String element) static booleanhasString(JsonObject object, String element) static booleanisNumber(JsonElement element) static booleanisString(JsonElement element)
-
Constructor Details
-
JsonHelper
public JsonHelper()
-
-
Method Details
-
hasString
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8307Lnet/minecraft/class_2145;method_8307(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasStringLnet/minecraft/util/JsonHelper;hasString(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
isString
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonElement;)Zintermediary method_8305Lnet/minecraft/class_2145;method_8305(Lcom/google/gson/JsonElement;)Znamed isStringLnet/minecraft/util/JsonHelper;isString(Lcom/google/gson/JsonElement;)Z
-
isNumber
- Mappings:
Namespace Name Mixin selector official bLrc;b(Lcom/google/gson/JsonElement;)Zintermediary method_12874Lnet/minecraft/class_2145;method_12874(Lcom/google/gson/JsonElement;)Znamed isNumberLnet/minecraft/util/JsonHelper;isNumber(Lcom/google/gson/JsonElement;)Z
-
hasBoolean
- Mappings:
Namespace Name Mixin selector official cLrc;c(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_10834Lnet/minecraft/class_2145;method_10834(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasBooleanLnet/minecraft/util/JsonHelper;hasBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
hasArray
- Mappings:
Namespace Name Mixin selector official dLrc;d(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8317Lnet/minecraft/class_2145;method_8317(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasArrayLnet/minecraft/util/JsonHelper;hasArray(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
hasPrimitive
- Mappings:
Namespace Name Mixin selector official fLrc;f(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8319Lnet/minecraft/class_2145;method_8319(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasPrimitiveLnet/minecraft/util/JsonHelper;hasPrimitive(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
hasElement
- Mappings:
Namespace Name Mixin selector official gLrc;g(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8320Lnet/minecraft/class_2145;method_8320(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasElementLnet/minecraft/util/JsonHelper;hasElement(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
asString
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;intermediary method_8306Lnet/minecraft/class_2145;method_8306(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;named asStringLnet/minecraft/util/JsonHelper;asString(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;
-
getString
- Mappings:
Namespace Name Mixin selector official hLrc;h(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/String;intermediary method_8321Lnet/minecraft/class_2145;method_8321(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/String;named getStringLnet/minecraft/util/JsonHelper;getString(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/String;
-
getString
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;intermediary method_8312Lnet/minecraft/class_2145;method_8312(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;named getStringLnet/minecraft/util/JsonHelper;getString(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-
asItem
- Mappings:
Namespace Name Mixin selector official bLrc;b(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lain;intermediary method_12875Lnet/minecraft/class_2145;method_12875(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lnet/minecraft/class_1069;named asItemLnet/minecraft/util/JsonHelper;asItem(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lnet/minecraft/item/Item;
-
getItem
- Mappings:
Namespace Name Mixin selector official iLrc;i(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lain;intermediary method_12876Lnet/minecraft/class_2145;method_12876(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lnet/minecraft/class_1069;named getItemLnet/minecraft/util/JsonHelper;getItem(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lnet/minecraft/item/Item;
-
asBoolean
- Mappings:
Namespace Name Mixin selector official cLrc;c(Lcom/google/gson/JsonElement;Ljava/lang/String;)Zintermediary method_8314Lnet/minecraft/class_2145;method_8314(Lcom/google/gson/JsonElement;Ljava/lang/String;)Znamed asBooleanLnet/minecraft/util/JsonHelper;asBoolean(Lcom/google/gson/JsonElement;Ljava/lang/String;)Z
-
getBoolean
- Mappings:
Namespace Name Mixin selector official jLrc;j(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8322Lnet/minecraft/class_2145;method_8322(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed getBooleanLnet/minecraft/util/JsonHelper;getBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
getBoolean
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Zintermediary method_8313Lnet/minecraft/class_2145;method_8313(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Znamed getBooleanLnet/minecraft/util/JsonHelper;getBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Z
-
asFloat
- Mappings:
Namespace Name Mixin selector official eLrc;e(Lcom/google/gson/JsonElement;Ljava/lang/String;)Fintermediary method_8316Lnet/minecraft/class_2145;method_8316(Lcom/google/gson/JsonElement;Ljava/lang/String;)Fnamed asFloatLnet/minecraft/util/JsonHelper;asFloat(Lcom/google/gson/JsonElement;Ljava/lang/String;)F
-
getFloat
- Mappings:
Namespace Name Mixin selector official lLrc;l(Lcom/google/gson/JsonObject;Ljava/lang/String;)Fintermediary method_8323Lnet/minecraft/class_2145;method_8323(Lcom/google/gson/JsonObject;Ljava/lang/String;)Fnamed getFloatLnet/minecraft/util/JsonHelper;getFloat(Lcom/google/gson/JsonObject;Ljava/lang/String;)F
-
getFloat
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;F)Fintermediary method_8308Lnet/minecraft/class_2145;method_8308(Lcom/google/gson/JsonObject;Ljava/lang/String;F)Fnamed getFloatLnet/minecraft/util/JsonHelper;getFloat(Lcom/google/gson/JsonObject;Ljava/lang/String;F)F
-
asInt
- Mappings:
Namespace Name Mixin selector official gLrc;g(Lcom/google/gson/JsonElement;Ljava/lang/String;)Iintermediary method_8318Lnet/minecraft/class_2145;method_8318(Lcom/google/gson/JsonElement;Ljava/lang/String;)Inamed asIntLnet/minecraft/util/JsonHelper;asInt(Lcom/google/gson/JsonElement;Ljava/lang/String;)I
-
getInt
- Mappings:
Namespace Name Mixin selector official nLrc;n(Lcom/google/gson/JsonObject;Ljava/lang/String;)Iintermediary method_8326Lnet/minecraft/class_2145;method_8326(Lcom/google/gson/JsonObject;Ljava/lang/String;)Inamed getIntLnet/minecraft/util/JsonHelper;getInt(Lcom/google/gson/JsonObject;Ljava/lang/String;)I
-
getInt
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;I)Iintermediary method_8309Lnet/minecraft/class_2145;method_8309(Lcom/google/gson/JsonObject;Ljava/lang/String;I)Inamed getIntLnet/minecraft/util/JsonHelper;getInt(Lcom/google/gson/JsonObject;Ljava/lang/String;I)I
-
asObject
- Mappings:
Namespace Name Mixin selector official mLrc;m(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;intermediary method_8324Lnet/minecraft/class_2145;method_8324(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;named asObjectLnet/minecraft/util/JsonHelper;asObject(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;
-
getObject
- Mappings:
Namespace Name Mixin selector official tLrc;t(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonObject;intermediary method_8327Lnet/minecraft/class_2145;method_8327(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonObject;named getObjectLnet/minecraft/util/JsonHelper;getObject(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonObject;
-
getObject
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;intermediary method_8311Lnet/minecraft/class_2145;method_8311(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;named getObjectLnet/minecraft/util/JsonHelper;getObject(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;
-
asArray
- Mappings:
Namespace Name Mixin selector official nLrc;n(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;intermediary method_8325Lnet/minecraft/class_2145;method_8325(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;named asArrayLnet/minecraft/util/JsonHelper;asArray(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;
-
getArray
- Mappings:
Namespace Name Mixin selector official uLrc;u(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonArray;intermediary method_8328Lnet/minecraft/class_2145;method_8328(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonArray;named getArrayLnet/minecraft/util/JsonHelper;getArray(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonArray;
-
getArray
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;intermediary method_8310Lnet/minecraft/class_2145;method_8310(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;named getArrayLnet/minecraft/util/JsonHelper;getArray(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;
-
deserialize
public static <T> T deserialize(@Nullable JsonElement element, String name, JsonDeserializationContext context, Class<? extends T> type) - Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonElement;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;intermediary method_12871Lnet/minecraft/class_2145;method_12871(Lcom/google/gson/JsonElement;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/JsonElement;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
-
deserialize
public static <T> T deserialize(JsonObject object, String element, JsonDeserializationContext context, Class<? extends T> type) - Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;intermediary method_12872Lnet/minecraft/class_2145;method_12872(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
-
deserialize
public static <T> T deserialize(JsonObject object, String element, T defaultValue, JsonDeserializationContext context, Class<? extends T> type) - Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/Object;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;intermediary method_12873Lnet/minecraft/class_2145;method_12873(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/Object;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/Object;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
-
getType
- Mappings:
Namespace Name Mixin selector official dLrc;d(Lcom/google/gson/JsonElement;)Ljava/lang/String;intermediary method_8315Lnet/minecraft/class_2145;method_8315(Lcom/google/gson/JsonElement;)Ljava/lang/String;named getTypeLnet/minecraft/util/JsonHelper;getType(Lcom/google/gson/JsonElement;)Ljava/lang/String;
-
deserialize
@Nullable public static <T> T deserialize(Gson gson, Reader reader, Class<T> class2, boolean lenient) - Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;Z)Ljava/lang/Object;intermediary method_12868Lnet/minecraft/class_2145;method_12868(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;Z)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;Z)Ljava/lang/Object;
-
deserialize
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/reflect/Type;Z)Ljava/lang/Object;intermediary method_15019Lnet/minecraft/class_2145;method_15019(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/reflect/Type;Z)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/reflect/Type;Z)Ljava/lang/Object;
-
deserialize
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/reflect/Type;Z)Ljava/lang/Object;intermediary method_15021Lnet/minecraft/class_2145;method_15021(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/reflect/Type;Z)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/reflect/Type;Z)Ljava/lang/Object;
-
deserialize
@Nullable public static <T> T deserialize(Gson gson, String content, Class<T> class2, boolean lenient) - Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;intermediary method_12870Lnet/minecraft/class_2145;method_12870(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
-
deserialize
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/reflect/Type;)Ljava/lang/Object;intermediary method_15018Lnet/minecraft/class_2145;method_15018(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/reflect/Type;)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
-
deserialize
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;intermediary method_15020Lnet/minecraft/class_2145;method_15020(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;
-
deserialize
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;)Ljava/lang/Object;intermediary method_15017Lnet/minecraft/class_2145;method_15017(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;)Ljava/lang/Object;
-
deserialize
- Mappings:
Namespace Name Mixin selector official aLrc;a(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;intermediary method_12869Lnet/minecraft/class_2145;method_12869(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;named deserializeLnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
-