Class JsonHelper
java.lang.Object
emi.shims.java.net.minecraft.util.JsonHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonArraystatic booleanstatic doublestatic floatstatic intstatic longstatic com.google.gson.JsonObjectstatic Stringstatic <T> Tdeserialize(@Nullable com.google.gson.JsonElement element, String name, com.google.gson.JsonDeserializationContext context, Class<? extends T> type) static <T> Tdeserialize(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken) static <T> Tdeserialize(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken, boolean lenient) static <T> Tdeserialize(com.google.gson.Gson gson, Reader reader, Class<T> type) static <T> Tdeserialize(com.google.gson.Gson gson, Reader reader, Class<T> type, boolean lenient) static <T> Tdeserialize(com.google.gson.Gson gson, String content, Class<T> type) static <T> Tdeserialize(com.google.gson.Gson gson, String content, Class<T> type, boolean lenient) static <T> Tdeserialize(com.google.gson.JsonObject object, String element, com.google.gson.JsonDeserializationContext context, Class<? extends T> type) static <T> Tdeserialize(com.google.gson.JsonObject object, String element, T defaultValue, com.google.gson.JsonDeserializationContext context, Class<? extends T> type) static com.google.gson.JsonObjectdeserialize(Reader reader) static com.google.gson.JsonObjectdeserialize(Reader reader, boolean lenient) static com.google.gson.JsonObjectdeserialize(String content) static com.google.gson.JsonObjectdeserialize(String content, boolean lenient) static com.google.gson.JsonArraydeserializeArray(Reader reader) static com.google.gson.JsonArraydeserializeArray(String content) static com.google.gson.JsonArraystatic @Nullable com.google.gson.JsonArraygetArray(com.google.gson.JsonObject object, String name, @Nullable com.google.gson.JsonArray defaultArray) static booleangetBoolean(com.google.gson.JsonObject object, String element) static booleangetBoolean(com.google.gson.JsonObject object, String element, boolean defaultBoolean) static doublestatic doublestatic floatstatic floatstatic intstatic intstatic longstatic longstatic com.google.gson.JsonObjectstatic @Nullable com.google.gson.JsonObjectgetObject(com.google.gson.JsonObject object, String element, @Nullable com.google.gson.JsonObject defaultObject) static Stringstatic @Nullable Stringstatic StringgetType(@Nullable com.google.gson.JsonElement element) static booleanstatic booleanhasBoolean(com.google.gson.JsonObject object, String element) static booleanhasElement(com.google.gson.JsonObject object, String element) static booleanhasJsonObject(com.google.gson.JsonObject object, String element) static booleanstatic booleanhasPrimitive(com.google.gson.JsonObject object, String element) static booleanstatic booleanisBoolean(com.google.gson.JsonElement object) static booleanisString(com.google.gson.JsonElement element) static <T> Tm_boxypbwp(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken, boolean bl) static <T> Tm_gludylcq(com.google.gson.Gson gson, String string, com.google.gson.reflect.TypeToken<T> typeToken, boolean bl) static <T> Tm_haynlcxa(com.google.gson.Gson gson, String string, Class<T> class_, boolean bl) static <T> Tm_vsbufiln(com.google.gson.Gson gson, Reader reader, Class<T> class_, boolean bl) static <T> Tm_zmohitsy(com.google.gson.Gson gson, String string, com.google.gson.reflect.TypeToken<T> typeToken) static StringtoSortedString(com.google.gson.JsonElement element) static voidwriteValue(com.google.gson.stream.JsonWriter writer, @Nullable com.google.gson.JsonElement element, @Nullable Comparator<String> comparator)
-
Constructor Details
-
JsonHelper
public JsonHelper()
-
-
Method Details
-
hasString
-
isString
public static boolean isString(com.google.gson.JsonElement element) -
hasNumber
-
hasBoolean
-
isBoolean
public static boolean isBoolean(com.google.gson.JsonElement object) -
hasArray
-
hasJsonObject
-
hasPrimitive
-
hasElement
-
asString
-
getString
-
getString
-
asBoolean
-
getBoolean
-
getBoolean
public static boolean getBoolean(com.google.gson.JsonObject object, String element, boolean defaultBoolean) -
asDouble
-
getDouble
-
getDouble
public static double getDouble(com.google.gson.JsonObject object, String element, double defaultDouble) -
asFloat
-
getFloat
-
getFloat
-
asLong
-
getLong
-
getLong
-
asInt
-
getInt
-
getInt
-
asObject
-
getObject
public static com.google.gson.JsonObject getObject(com.google.gson.JsonObject object, String element) -
getObject
@Nullable public static @Nullable com.google.gson.JsonObject getObject(com.google.gson.JsonObject object, String element, @Nullable @Nullable com.google.gson.JsonObject defaultObject) -
asArray
-
getArray
-
getArray
@Nullable public static @Nullable com.google.gson.JsonArray getArray(com.google.gson.JsonObject object, String name, @Nullable @Nullable com.google.gson.JsonArray defaultArray) -
deserialize
-
deserialize
-
deserialize
-
getType
-
m_vsbufiln
-
deserialize
-
m_boxypbwp
@Nullable public static <T> T m_boxypbwp(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken, boolean bl) -
deserialize
public static <T> T deserialize(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken, boolean lenient) -
m_gludylcq
@Nullable public static <T> T m_gludylcq(com.google.gson.Gson gson, String string, com.google.gson.reflect.TypeToken<T> typeToken, boolean bl) -
deserialize
-
m_haynlcxa
-
deserialize
public static <T> T deserialize(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken) -
m_zmohitsy
@Nullable public static <T> T m_zmohitsy(com.google.gson.Gson gson, String string, com.google.gson.reflect.TypeToken<T> typeToken) -
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserializeArray
-
deserializeArray
-
toSortedString
-
writeValue
public static void writeValue(com.google.gson.stream.JsonWriter writer, @Nullable @Nullable com.google.gson.JsonElement element, @Nullable @Nullable Comparator<String> comparator) throws IOException - Throws:
IOException
-