Package net.minecraft.util
Class GsonHelper
java.lang.Object
net.minecraft.util.GsonHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimalconvertToBigDecimal(com.google.gson.JsonElement p_144779_, String p_144780_)static BigIntegerconvertToBigInteger(com.google.gson.JsonElement p_144782_, String p_144783_)static booleanconvertToBoolean(com.google.gson.JsonElement p_13878_, String p_13879_)static byteconvertToByte(com.google.gson.JsonElement p_13904_, String p_13905_)static charconvertToCharacter(com.google.gson.JsonElement p_144776_, String p_144777_)static doubleconvertToDouble(com.google.gson.JsonElement p_144770_, String p_144771_)static floatconvertToFloat(com.google.gson.JsonElement p_13889_, String p_13890_)static intconvertToInt(com.google.gson.JsonElement p_13898_, String p_13899_)static ItemconvertToItem(com.google.gson.JsonElement p_13875_, String p_13876_)static com.google.gson.JsonArrayconvertToJsonArray(com.google.gson.JsonElement p_13925_, String p_13926_)static com.google.gson.JsonObjectconvertToJsonObject(com.google.gson.JsonElement p_13919_, String p_13920_)static longconvertToLong(com.google.gson.JsonElement p_13892_, String p_13893_)static <T> TconvertToObject(com.google.gson.JsonElement p_13809_, String p_13810_, com.google.gson.JsonDeserializationContext p_13811_, Class<? extends T> p_13812_)static shortconvertToShort(com.google.gson.JsonElement p_144788_, String p_144789_)static StringconvertToString(com.google.gson.JsonElement p_13806_, String p_13807_)static <T> TfromJson(com.google.gson.Gson p_13768_, Reader p_13769_, com.google.gson.reflect.TypeToken<T> p_13770_)static <T> TfromJson(com.google.gson.Gson p_13772_, Reader p_13773_, com.google.gson.reflect.TypeToken<T> p_13774_, boolean p_13775_)static <T> Tstatic <T> Tstatic <T> TfromJson(com.google.gson.Gson p_13786_, String p_13787_, com.google.gson.reflect.TypeToken<T> p_13788_)static <T> TfromJson(com.google.gson.Gson p_13790_, String p_13791_, com.google.gson.reflect.TypeToken<T> p_13792_, boolean p_13793_)static <T> Tstatic <T> Tstatic BigDecimalgetAsBigDecimal(com.google.gson.JsonObject p_144797_, String p_144798_)static BigDecimalgetAsBigDecimal(com.google.gson.JsonObject p_144751_, String p_144752_, BigDecimal p_144753_)static BigIntegergetAsBigInteger(com.google.gson.JsonObject p_144800_, String p_144801_)static BigIntegergetAsBigInteger(com.google.gson.JsonObject p_144755_, String p_144756_, BigInteger p_144757_)static booleangetAsBoolean(com.google.gson.JsonObject p_13913_, String p_13914_)static booleangetAsBoolean(com.google.gson.JsonObject p_13856_, String p_13857_, boolean p_13858_)static bytestatic bytestatic chargetAsCharacter(com.google.gson.JsonObject p_144794_, String p_144795_)static chargetAsCharacter(com.google.gson.JsonObject p_144739_, String p_144740_, char p_144741_)static doublegetAsDouble(com.google.gson.JsonObject p_144785_, String p_144786_)static doublegetAsDouble(com.google.gson.JsonObject p_144743_, String p_144744_, double p_144745_)static floatgetAsFloat(com.google.gson.JsonObject p_13916_, String p_13917_)static floatgetAsFloat(com.google.gson.JsonObject p_13821_, String p_13822_, float p_13823_)static intstatic intstatic Itemstatic Itemstatic com.google.gson.JsonArraygetAsJsonArray(com.google.gson.JsonObject p_13934_, String p_13935_)static com.google.gson.JsonArraygetAsJsonArray(com.google.gson.JsonObject p_13833_, String p_13834_, com.google.gson.JsonArray p_13835_)static com.google.gson.JsonObjectgetAsJsonObject(com.google.gson.JsonObject p_13931_, String p_13932_)static com.google.gson.JsonObjectgetAsJsonObject(com.google.gson.JsonObject p_13842_, String p_13843_, com.google.gson.JsonObject p_13844_)static longstatic longstatic <T> TgetAsObject(com.google.gson.JsonObject p_13837_, String p_13838_, com.google.gson.JsonDeserializationContext p_13839_, Class<? extends T> p_13840_)static <T> TgetAsObject(com.google.gson.JsonObject p_13846_, String p_13847_, T p_13848_, com.google.gson.JsonDeserializationContext p_13849_, Class<? extends T> p_13850_)static shortgetAsShort(com.google.gson.JsonObject p_144803_, String p_144804_)static shortgetAsShort(com.google.gson.JsonObject p_144759_, String p_144760_, short p_144761_)static StringgetAsString(com.google.gson.JsonObject p_13907_, String p_13908_)static StringgetAsString(com.google.gson.JsonObject p_13852_, String p_13853_, String p_13854_)static StringgetType(com.google.gson.JsonElement p_13884_)static booleanisArrayNode(com.google.gson.JsonObject p_13886_, String p_13887_)static booleanisBooleanValue(com.google.gson.JsonElement p_144768_)static booleanisBooleanValue(com.google.gson.JsonObject p_13881_, String p_13882_)static booleanisNumberValue(com.google.gson.JsonElement p_13873_)static booleanisNumberValue(com.google.gson.JsonObject p_144763_, String p_144764_)static booleanisObjectNode(com.google.gson.JsonObject p_144773_, String p_144774_)static booleanisStringValue(com.google.gson.JsonElement p_13804_)static booleanisStringValue(com.google.gson.JsonObject p_13814_, String p_13815_)static booleanisValidNode(com.google.gson.JsonObject p_13901_, String p_13902_)static booleanisValidPrimitive(com.google.gson.JsonObject p_13895_, String p_13896_)static com.google.gson.JsonObjectstatic com.google.gson.JsonObjectstatic com.google.gson.JsonObjectstatic com.google.gson.JsonObjectstatic com.google.gson.JsonArrayparseArray(Reader p_144766_)
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON
-
-
Constructor Details
-
GsonHelper
public GsonHelper()
-
-
Method Details
-
isStringValue
-
isStringValue
public static boolean isStringValue(com.google.gson.JsonElement p_13804_) -
isNumberValue
-
isNumberValue
public static boolean isNumberValue(com.google.gson.JsonElement p_13873_) -
isBooleanValue
-
isBooleanValue
public static boolean isBooleanValue(com.google.gson.JsonElement p_144768_) -
isArrayNode
-
isObjectNode
-
isValidPrimitive
-
isValidNode
-
convertToString
-
getAsString
-
getAsString
-
convertToItem
-
getAsItem
-
getAsItem
-
convertToBoolean
-
getAsBoolean
-
getAsBoolean
public static boolean getAsBoolean(com.google.gson.JsonObject p_13856_, String p_13857_, boolean p_13858_) -
convertToDouble
-
getAsDouble
-
getAsDouble
public static double getAsDouble(com.google.gson.JsonObject p_144743_, String p_144744_, double p_144745_) -
convertToFloat
-
getAsFloat
-
getAsFloat
public static float getAsFloat(com.google.gson.JsonObject p_13821_, String p_13822_, float p_13823_) -
convertToLong
-
getAsLong
-
getAsLong
-
convertToInt
-
getAsInt
-
getAsInt
-
convertToByte
-
getAsByte
-
getAsByte
-
convertToCharacter
-
getAsCharacter
-
getAsCharacter
public static char getAsCharacter(com.google.gson.JsonObject p_144739_, String p_144740_, char p_144741_) -
convertToBigDecimal
public static BigDecimal convertToBigDecimal(com.google.gson.JsonElement p_144779_, String p_144780_) -
getAsBigDecimal
-
getAsBigDecimal
public static BigDecimal getAsBigDecimal(com.google.gson.JsonObject p_144751_, String p_144752_, BigDecimal p_144753_) -
convertToBigInteger
public static BigInteger convertToBigInteger(com.google.gson.JsonElement p_144782_, String p_144783_) -
getAsBigInteger
-
getAsBigInteger
public static BigInteger getAsBigInteger(com.google.gson.JsonObject p_144755_, String p_144756_, BigInteger p_144757_) -
convertToShort
-
getAsShort
-
getAsShort
public static short getAsShort(com.google.gson.JsonObject p_144759_, String p_144760_, short p_144761_) -
convertToJsonObject
public static com.google.gson.JsonObject convertToJsonObject(com.google.gson.JsonElement p_13919_, String p_13920_) -
getAsJsonObject
public static com.google.gson.JsonObject getAsJsonObject(com.google.gson.JsonObject p_13931_, String p_13932_) -
getAsJsonObject
public static com.google.gson.JsonObject getAsJsonObject(com.google.gson.JsonObject p_13842_, String p_13843_, com.google.gson.JsonObject p_13844_) -
convertToJsonArray
public static com.google.gson.JsonArray convertToJsonArray(com.google.gson.JsonElement p_13925_, String p_13926_) -
getAsJsonArray
public static com.google.gson.JsonArray getAsJsonArray(com.google.gson.JsonObject p_13934_, String p_13935_) -
getAsJsonArray
@Nullable public static com.google.gson.JsonArray getAsJsonArray(com.google.gson.JsonObject p_13833_, String p_13834_, @Nullable com.google.gson.JsonArray p_13835_) -
convertToObject
-
getAsObject
-
getAsObject
-
getType
-
fromJson
-
fromJson
@Nullable public static <T> T fromJson(com.google.gson.Gson p_13772_, Reader p_13773_, com.google.gson.reflect.TypeToken<T> p_13774_, boolean p_13775_) -
fromJson
@Nullable public static <T> T fromJson(com.google.gson.Gson p_13790_, String p_13791_, com.google.gson.reflect.TypeToken<T> p_13792_, boolean p_13793_) -
fromJson
-
fromJson
@Nullable public static <T> T fromJson(com.google.gson.Gson p_13768_, Reader p_13769_, com.google.gson.reflect.TypeToken<T> p_13770_) -
fromJson
@Nullable public static <T> T fromJson(com.google.gson.Gson p_13786_, String p_13787_, com.google.gson.reflect.TypeToken<T> p_13788_) -
fromJson
-
fromJson
-
parse
-
parse
-
parse
-
parse
-
parseArray
-