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