net.minecraft.util

public class JsonHelper

net.minecraft.util.GsonHelper
net.minecraft.class_3518
net.minecraft.util.JsonHelper

Field summary

Modifier and TypeField
private static final com.google.gson.Gson
GSON
field_15657
GSON

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static boolean
isStringValue(com.google.gson.JsonObject node, String name)
method_15289(com.google.gson.JsonObject arg0, String arg1)
hasString(com.google.gson.JsonObject object, String element)
public static boolean
isStringValue(com.google.gson.JsonElement node)
method_15286(com.google.gson.JsonElement arg0)
isString(com.google.gson.JsonElement element)
public static boolean
isNumberValue(com.google.gson.JsonObject node, String name)
method_34920(com.google.gson.JsonObject arg0, String arg1)
hasNumber(com.google.gson.JsonObject object, String element)
public static boolean
isNumberValue(com.google.gson.JsonElement node)
method_15275(com.google.gson.JsonElement arg0)
isNumber(com.google.gson.JsonElement element)
public static boolean
isBooleanValue(com.google.gson.JsonObject node, String name)
method_15254(com.google.gson.JsonObject arg0, String arg1)
hasBoolean(com.google.gson.JsonObject object, String element)
public static boolean
isBooleanValue(com.google.gson.JsonElement node)
method_34921(com.google.gson.JsonElement arg0)
isBoolean(com.google.gson.JsonElement object)
public static boolean
isArrayNode(com.google.gson.JsonObject node, String name)
method_15264(com.google.gson.JsonObject arg0, String arg1)
hasArray(com.google.gson.JsonObject object, String element)
public static boolean
isObjectNode(com.google.gson.JsonObject node, String name)
method_34923(com.google.gson.JsonObject arg0, String arg1)
hasJsonObject(com.google.gson.JsonObject object, String element)
public static boolean
isValidPrimitive(com.google.gson.JsonObject node, String name)
method_15278(com.google.gson.JsonObject arg0, String arg1)
hasPrimitive(com.google.gson.JsonObject object, String element)
public static boolean
isValidNode(com.google.gson.JsonObject node, String name)
method_15294(com.google.gson.JsonObject arg0, String arg1)
hasElement(com.google.gson.JsonObject object, String element)
public static com.google.gson.JsonElement
getNonNull(com.google.gson.JsonObject object, String name)
method_52226(com.google.gson.JsonObject arg0, String arg1)
getElement(com.google.gson.JsonObject object, String name)
public static String
convertToString(com.google.gson.JsonElement element, String name)
method_15287(com.google.gson.JsonElement arg0, String arg1)
asString(com.google.gson.JsonElement element, String name)
public static String
getAsString(com.google.gson.JsonObject object, String name)
method_15265(com.google.gson.JsonObject arg0, String arg1)
getString(com.google.gson.JsonObject object, String element)
public static String
getAsString(com.google.gson.JsonObject object, String name, String def)
method_15253(com.google.gson.JsonObject arg0, String arg1, String arg2)
getString(com.google.gson.JsonObject object, String element, String defaultStr)
public static RegistryEntry<Item>
convertToItem(com.google.gson.JsonElement element, String name)
method_15256(com.google.gson.JsonElement arg0, String arg1)
asItem(com.google.gson.JsonElement element, String name)
public static RegistryEntry<Item>
getAsItem(com.google.gson.JsonObject object, String name)
method_15288(com.google.gson.JsonObject arg0, String arg1)
getItem(com.google.gson.JsonObject object, String key)
public static RegistryEntry<Item>
getAsItem(com.google.gson.JsonObject object, String name, Holder<Item> def)
method_34916(com.google.gson.JsonObject arg0, String arg1, class_6880<class_1792> arg2)
getItem(com.google.gson.JsonObject object, String key, RegistryEntry<Item> defaultValue)
public static boolean
convertToBoolean(com.google.gson.JsonElement element, String name)
method_15268(com.google.gson.JsonElement arg0, String arg1)
asBoolean(com.google.gson.JsonElement element, String name)
public static boolean
getAsBoolean(com.google.gson.JsonObject object, String name)
method_15270(com.google.gson.JsonObject arg0, String arg1)
getBoolean(com.google.gson.JsonObject object, String element)
public static boolean
getAsBoolean(com.google.gson.JsonObject object, String name, boolean def)
method_15258(com.google.gson.JsonObject arg0, String arg1, boolean arg2)
getBoolean(com.google.gson.JsonObject object, String element, boolean defaultBoolean)
public static double
convertToDouble(com.google.gson.JsonElement element, String name)
method_34922(com.google.gson.JsonElement arg0, String arg1)
asDouble(com.google.gson.JsonElement object, String name)
public static double
getAsDouble(com.google.gson.JsonObject object, String name)
method_34927(com.google.gson.JsonObject arg0, String arg1)
getDouble(com.google.gson.JsonObject object, String element)
public static double
getAsDouble(com.google.gson.JsonObject object, String name, double def)
method_34915(com.google.gson.JsonObject arg0, String arg1, double arg2)
getDouble(com.google.gson.JsonObject object, String element, double defaultDouble)
public static float
convertToFloat(com.google.gson.JsonElement element, String name)
method_15269(com.google.gson.JsonElement arg0, String arg1)
asFloat(com.google.gson.JsonElement element, String name)
public static float
getAsFloat(com.google.gson.JsonObject object, String name)
method_15259(com.google.gson.JsonObject arg0, String arg1)
getFloat(com.google.gson.JsonObject object, String element)
public static float
getAsFloat(com.google.gson.JsonObject object, String name, float def)
method_15277(com.google.gson.JsonObject arg0, String arg1, float arg2)
getFloat(com.google.gson.JsonObject object, String element, float defaultFloat)
public static long
convertToLong(com.google.gson.JsonElement element, String name)
method_15263(com.google.gson.JsonElement arg0, String arg1)
asLong(com.google.gson.JsonElement element, String name)
public static long
getAsLong(com.google.gson.JsonObject object, String name)
method_22449(com.google.gson.JsonObject arg0, String arg1)
getLong(com.google.gson.JsonObject object, String name)
public static long
getAsLong(com.google.gson.JsonObject object, String name, long def)
method_15280(com.google.gson.JsonObject arg0, String arg1, long arg2)
getLong(com.google.gson.JsonObject object, String element, long defaultLong)
public static int
convertToInt(com.google.gson.JsonElement element, String name)
method_15257(com.google.gson.JsonElement arg0, String arg1)
asInt(com.google.gson.JsonElement element, String name)
public static int
getAsInt(com.google.gson.JsonObject object, String name)
method_15260(com.google.gson.JsonObject arg0, String arg1)
getInt(com.google.gson.JsonObject object, String element)
public static int
getAsInt(com.google.gson.JsonObject object, String name, int def)
method_15282(com.google.gson.JsonObject arg0, String arg1, int arg2)
getInt(com.google.gson.JsonObject object, String element, int defaultInt)
public static byte
convertToByte(com.google.gson.JsonElement element, String name)
method_15293(com.google.gson.JsonElement arg0, String arg1)
asByte(com.google.gson.JsonElement element, String name)
public static byte
getAsByte(com.google.gson.JsonObject object, String name)
method_34929(com.google.gson.JsonObject arg0, String arg1)
getByte(com.google.gson.JsonObject object, String element)
public static byte
getAsByte(com.google.gson.JsonObject object, String name, byte def)
method_15271(com.google.gson.JsonObject arg0, String arg1, byte arg2)
getByte(com.google.gson.JsonObject object, String element, byte defaultByte)
public static char
convertToCharacter(com.google.gson.JsonElement element, String name)
method_34924(com.google.gson.JsonElement arg0, String arg1)
asChar(com.google.gson.JsonElement element, String name)
public static char
getAsCharacter(com.google.gson.JsonObject object, String name)
method_34930(com.google.gson.JsonObject arg0, String arg1)
getChar(com.google.gson.JsonObject object, String element)
public static char
getAsCharacter(com.google.gson.JsonObject object, String name, char def)
method_34914(com.google.gson.JsonObject arg0, String arg1, char arg2)
getChar(com.google.gson.JsonObject object, String element, char defaultChar)
public static BigDecimal
convertToBigDecimal(com.google.gson.JsonElement element, String name)
method_34925(com.google.gson.JsonElement arg0, String arg1)
asBigDecimal(com.google.gson.JsonElement element, String name)
public static BigDecimal
getAsBigDecimal(com.google.gson.JsonObject object, String name)
method_34931(com.google.gson.JsonObject arg0, String arg1)
getBigDecimal(com.google.gson.JsonObject object, String element)
public static BigDecimal
getAsBigDecimal(com.google.gson.JsonObject object, String name, BigDecimal def)
method_34917(com.google.gson.JsonObject arg0, String arg1, BigDecimal arg2)
getBigDecimal(com.google.gson.JsonObject object, String element, BigDecimal defaultBigDecimal)
public static BigInteger
convertToBigInteger(com.google.gson.JsonElement element, String name)
method_34926(com.google.gson.JsonElement arg0, String arg1)
asBigInteger(com.google.gson.JsonElement element, String name)
public static BigInteger
getAsBigInteger(com.google.gson.JsonObject object, String name)
method_34932(com.google.gson.JsonObject arg0, String arg1)
getBigInteger(com.google.gson.JsonObject object, String element)
public static BigInteger
getAsBigInteger(com.google.gson.JsonObject object, String name, BigInteger def)
method_34918(com.google.gson.JsonObject arg0, String arg1, BigInteger arg2)
getBigInteger(com.google.gson.JsonObject object, String element, BigInteger defaultBigInteger)
public static short
convertToShort(com.google.gson.JsonElement element, String name)
method_34928(com.google.gson.JsonElement arg0, String arg1)
asShort(com.google.gson.JsonElement element, String name)
public static short
getAsShort(com.google.gson.JsonObject object, String name)
method_34933(com.google.gson.JsonObject arg0, String arg1)
getShort(com.google.gson.JsonObject object, String element)
public static short
getAsShort(com.google.gson.JsonObject object, String name, short def)
method_34919(com.google.gson.JsonObject arg0, String arg1, short arg2)
getShort(com.google.gson.JsonObject object, String element, short defaultShort)
public static com.google.gson.JsonObject
convertToJsonObject(com.google.gson.JsonElement element, String name)
method_15295(com.google.gson.JsonElement arg0, String arg1)
asObject(com.google.gson.JsonElement element, String name)
public static com.google.gson.JsonObject
getAsJsonObject(com.google.gson.JsonObject object, String name)
method_15296(com.google.gson.JsonObject arg0, String arg1)
getObject(com.google.gson.JsonObject object, String element)
public static com.google.gson.JsonObject
getAsJsonObject(com.google.gson.JsonObject object, String name, com.google.gson.JsonObject def)
method_15281(com.google.gson.JsonObject arg0, String arg1, com.google.gson.JsonObject arg2)
getObject(com.google.gson.JsonObject object, String element, com.google.gson.JsonObject defaultObject)
public static com.google.gson.JsonArray
convertToJsonArray(com.google.gson.JsonElement element, String name)
method_15252(com.google.gson.JsonElement arg0, String arg1)
asArray(com.google.gson.JsonElement element, String name)
public static com.google.gson.JsonArray
getAsJsonArray(com.google.gson.JsonObject object, String name)
method_15261(com.google.gson.JsonObject arg0, String arg1)
getArray(com.google.gson.JsonObject object, String element)
public static com.google.gson.JsonArray
getAsJsonArray(com.google.gson.JsonObject object, String name, com.google.gson.JsonArray def)
method_15292(com.google.gson.JsonObject arg0, String arg1, com.google.gson.JsonArray arg2)
getArray(com.google.gson.JsonObject object, String name, com.google.gson.JsonArray defaultArray)
public static <T> T
convertToObject(com.google.gson.JsonElement element, String name, com.google.gson.JsonDeserializationContext context, Class<? extends T> clazz)
method_15291(com.google.gson.JsonElement arg0, String arg1, com.google.gson.JsonDeserializationContext arg2, Class<? extends T> arg3)
deserialize(com.google.gson.JsonElement element, String name, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
public static <T> T
getAsObject(com.google.gson.JsonObject object, String name, com.google.gson.JsonDeserializationContext context, Class<? extends T> clazz)
method_15272(com.google.gson.JsonObject arg0, String arg1, com.google.gson.JsonDeserializationContext arg2, Class<? extends T> arg3)
deserialize(com.google.gson.JsonObject object, String element, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
public static <T> T
getAsObject(com.google.gson.JsonObject object, String name, T def, com.google.gson.JsonDeserializationContext context, Class<? extends T> clazz)
method_15283(com.google.gson.JsonObject arg0, String arg1, T arg2, com.google.gson.JsonDeserializationContext arg3, Class<? extends T> arg4)
deserialize(com.google.gson.JsonObject object, String element, T defaultValue, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
public static String
getType(com.google.gson.JsonElement element)
method_15266(com.google.gson.JsonElement arg0)
getType(com.google.gson.JsonElement element)
public static <T> T
fromJson(com.google.gson.Gson gson, Reader reader, Class<T> type)
method_15276(com.google.gson.Gson arg0, Reader arg1, Class<T> arg2)
deserialize(com.google.gson.Gson gson, Reader reader, Class<T> type)
public static <T> T
fromNullableJson(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> type)
method_47992(com.google.gson.Gson arg0, Reader arg1, com.google.gson.reflect.TypeToken<T> arg2)
deserializeNullable(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken)
public static <T> T
fromJson(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> type)
method_15297(com.google.gson.Gson arg0, Reader arg1, com.google.gson.reflect.TypeToken<T> arg2)
deserialize(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken)
public static <T> T
fromNullableJson(com.google.gson.Gson gson, String string, com.google.gson.reflect.TypeToken<T> type)
method_15290(com.google.gson.Gson arg0, String arg1, com.google.gson.reflect.TypeToken<T> arg2)
deserialize(com.google.gson.Gson gson, String content, com.google.gson.reflect.TypeToken<T> typeToken)
public static <T> T
fromJson(com.google.gson.Gson gson, String string, Class<T> type)
method_15284(com.google.gson.Gson arg0, String arg1, Class<T> arg2)
deserialize(com.google.gson.Gson gson, String content, Class<T> type)
public static com.google.gson.JsonObject
parse(String string)
method_15285(String arg0)
deserialize(String content)
public static com.google.gson.JsonObject
parse(Reader reader)
method_15255(Reader arg0)
deserialize(Reader reader)
public static com.google.gson.JsonArray
parseArray(String string)
method_43679(String arg0)
deserializeArray(String content)
public static com.google.gson.JsonArray
parseArray(Reader reader)
method_37165(Reader arg0)
deserializeArray(Reader reader)
public static String
toStableString(com.google.gson.JsonElement jsonElement)
method_43680(com.google.gson.JsonElement arg0)
toSortedString(com.google.gson.JsonElement json)
public static void
writeValue(com.google.gson.stream.JsonWriter out, com.google.gson.JsonElement value, Comparator<String> keyComparator)
method_43677(com.google.gson.stream.JsonWriter arg0, com.google.gson.JsonElement arg1, Comparator<String> arg2)
writeSorted(com.google.gson.stream.JsonWriter writer, com.google.gson.JsonElement json, Comparator<String> comparator)
private static Collection<Map$Entry<String, com.google.gson.JsonElement>>
sortByKeyIfNeeded(Collection<Map$Entry<String, com.google.gson.JsonElement>> elements, Comparator<String> keyComparator)
method_43678(Collection<Map$Entry<String, com.google.gson.JsonElement>> arg0, Comparator<String> arg1)
sort(Collection<Map$Entry<String, com.google.gson.JsonElement>> entries, Comparator<String> comparator)
public static boolean
encodesLongerThan(com.google.gson.JsonElement element, int limit)
method_66034(com.google.gson.JsonElement arg0, int arg1)
isTooLarge(com.google.gson.JsonElement json, int maxLength)
private static com.google.gson.JsonSyntaxException
lambda$convertToItem$0(String arg0, String arg1)
method_17995(String arg0, String arg1)
method_17995(String arg0, String arg1)