Package net.minecraft.util
Class JSONUtils
java.lang.Object
net.minecraft.util.JSONUtils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
convertToBoolean
(com.google.gson.JsonElement p_151216_0_, String p_151216_1_) static byte
convertToByte
(com.google.gson.JsonElement p_204332_0_, String p_204332_1_) static float
convertToFloat
(com.google.gson.JsonElement p_151220_0_, String p_151220_1_) static int
convertToInt
(com.google.gson.JsonElement p_151215_0_, String p_151215_1_) static Item
convertToItem
(com.google.gson.JsonElement p_188172_0_, String p_188172_1_) static com.google.gson.JsonArray
convertToJsonArray
(com.google.gson.JsonElement p_151207_0_, String p_151207_1_) static com.google.gson.JsonObject
convertToJsonObject
(com.google.gson.JsonElement p_151210_0_, String p_151210_1_) static long
convertToLong
(com.google.gson.JsonElement p_219794_0_, String p_219794_1_) static <T> T
convertToObject
(com.google.gson.JsonElement p_188179_0_, String p_188179_1_, com.google.gson.JsonDeserializationContext p_188179_2_, Class<? extends T> p_188179_3_) static String
convertToString
(com.google.gson.JsonElement p_151206_0_, String p_151206_1_) static <T> T
fromJson
(com.google.gson.Gson p_233010_0_, Reader p_233010_1_, com.google.gson.reflect.TypeToken<T> p_233010_2_) static <T> T
fromJson
(com.google.gson.Gson p_233011_0_, Reader p_233011_1_, com.google.gson.reflect.TypeToken<T> p_233011_2_, boolean p_233011_3_) static <T> T
static <T> T
fromJson
(com.google.gson.Gson p_188173_0_, Reader p_188173_1_, Class<T> p_188173_2_, boolean p_188173_3_) static <T> T
fromJson
(com.google.gson.Gson p_233012_0_, String p_233012_1_, com.google.gson.reflect.TypeToken<T> p_233012_2_) static <T> T
fromJson
(com.google.gson.Gson p_233013_0_, String p_233013_1_, com.google.gson.reflect.TypeToken<T> p_233013_2_, boolean p_233013_3_) static <T> T
static <T> T
fromJson
(com.google.gson.Gson p_188176_0_, String p_188176_1_, Class<T> p_188176_2_, boolean p_188176_3_) static boolean
getAsBoolean
(com.google.gson.JsonObject p_151212_0_, String p_151212_1_) static boolean
getAsBoolean
(com.google.gson.JsonObject p_151209_0_, String p_151209_1_, boolean p_151209_2_) static byte
static float
getAsFloat
(com.google.gson.JsonObject p_151217_0_, String p_151217_1_) static float
getAsFloat
(com.google.gson.JsonObject p_151221_0_, String p_151221_1_, float p_151221_2_) static int
static int
static Item
static com.google.gson.JsonArray
getAsJsonArray
(com.google.gson.JsonObject p_151214_0_, String p_151214_1_) static com.google.gson.JsonArray
getAsJsonArray
(com.google.gson.JsonObject p_151213_0_, String p_151213_1_, com.google.gson.JsonArray p_151213_2_) static com.google.gson.JsonObject
getAsJsonObject
(com.google.gson.JsonObject p_152754_0_, String p_152754_1_) static com.google.gson.JsonObject
getAsJsonObject
(com.google.gson.JsonObject p_151218_0_, String p_151218_1_, com.google.gson.JsonObject p_151218_2_) static long
static long
static <T> T
getAsObject
(com.google.gson.JsonObject p_188174_0_, String p_188174_1_, com.google.gson.JsonDeserializationContext p_188174_2_, Class<? extends T> p_188174_3_) static <T> T
getAsObject
(com.google.gson.JsonObject p_188177_0_, String p_188177_1_, T p_188177_2_, com.google.gson.JsonDeserializationContext p_188177_3_, Class<? extends T> p_188177_4_) static String
getAsString
(com.google.gson.JsonObject p_151200_0_, String p_151200_1_) static String
getAsString
(com.google.gson.JsonObject p_151219_0_, String p_151219_1_, String p_151219_2_) static String
getType
(com.google.gson.JsonElement p_151222_0_) static boolean
isArrayNode
(com.google.gson.JsonObject p_151202_0_, String p_151202_1_) static boolean
isBooleanValue
(com.google.gson.JsonObject p_180199_0_, String p_180199_1_) static boolean
isNumberValue
(com.google.gson.JsonElement p_188175_0_) static boolean
isStringValue
(com.google.gson.JsonElement p_151211_0_) static boolean
isStringValue
(com.google.gson.JsonObject p_151205_0_, String p_151205_1_) static boolean
isValidNode
(com.google.gson.JsonObject p_151204_0_, String p_151204_1_) static boolean
isValidPrimitive
(com.google.gson.JsonObject p_151201_0_, String p_151201_1_) static com.google.gson.JsonObject
static com.google.gson.JsonObject
static com.google.gson.JsonObject
static com.google.gson.JsonObject
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON
-
-
Constructor Details
-
JSONUtils
public JSONUtils()
-
-
Method Details
-
isStringValue
-
isStringValue
public static boolean isStringValue(com.google.gson.JsonElement p_151211_0_) -
isNumberValue
public static boolean isNumberValue(com.google.gson.JsonElement p_188175_0_) -
isBooleanValue
-
isArrayNode
-
isValidPrimitive
-
isValidNode
-
convertToString
-
getAsString
-
getAsString
-
convertToItem
-
getAsItem
-
convertToBoolean
-
getAsBoolean
-
getAsBoolean
public static boolean getAsBoolean(com.google.gson.JsonObject p_151209_0_, String p_151209_1_, boolean p_151209_2_) -
convertToFloat
-
getAsFloat
-
getAsFloat
public static float getAsFloat(com.google.gson.JsonObject p_151221_0_, String p_151221_1_, float p_151221_2_) -
convertToLong
-
getAsLong
-
getAsLong
public static long getAsLong(com.google.gson.JsonObject p_219796_0_, String p_219796_1_, long p_219796_2_) -
convertToInt
-
getAsInt
-
getAsInt
public static int getAsInt(com.google.gson.JsonObject p_151208_0_, String p_151208_1_, int p_151208_2_) -
convertToByte
-
getAsByte
public static byte getAsByte(com.google.gson.JsonObject p_219795_0_, String p_219795_1_, byte p_219795_2_) -
convertToJsonObject
public static com.google.gson.JsonObject convertToJsonObject(com.google.gson.JsonElement p_151210_0_, String p_151210_1_) -
getAsJsonObject
public static com.google.gson.JsonObject getAsJsonObject(com.google.gson.JsonObject p_152754_0_, String p_152754_1_) -
getAsJsonObject
public static com.google.gson.JsonObject getAsJsonObject(com.google.gson.JsonObject p_151218_0_, String p_151218_1_, com.google.gson.JsonObject p_151218_2_) -
convertToJsonArray
public static com.google.gson.JsonArray convertToJsonArray(com.google.gson.JsonElement p_151207_0_, String p_151207_1_) -
getAsJsonArray
public static com.google.gson.JsonArray getAsJsonArray(com.google.gson.JsonObject p_151214_0_, String p_151214_1_) -
getAsJsonArray
@Nullable public static com.google.gson.JsonArray getAsJsonArray(com.google.gson.JsonObject p_151213_0_, String p_151213_1_, @Nullable com.google.gson.JsonArray p_151213_2_) -
convertToObject
-
getAsObject
-
getAsObject
-
getType
-
fromJson
-
fromJson
@Nullable public static <T> T fromJson(com.google.gson.Gson p_233011_0_, Reader p_233011_1_, com.google.gson.reflect.TypeToken<T> p_233011_2_, boolean p_233011_3_) -
fromJson
@Nullable public static <T> T fromJson(com.google.gson.Gson p_233013_0_, String p_233013_1_, com.google.gson.reflect.TypeToken<T> p_233013_2_, boolean p_233013_3_) -
fromJson
-
fromJson
@Nullable public static <T> T fromJson(com.google.gson.Gson p_233010_0_, Reader p_233010_1_, com.google.gson.reflect.TypeToken<T> p_233010_2_) -
fromJson
@Nullable public static <T> T fromJson(com.google.gson.Gson p_233012_0_, String p_233012_1_, com.google.gson.reflect.TypeToken<T> p_233012_2_) -
fromJson
-
fromJson
-
parse
-
parse
-
parse
-
parse
-