Class JsonHelper

java.lang.Object
emi.shims.java.net.minecraft.util.JsonHelper

public class JsonHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.gson.JsonArray
    asArray(com.google.gson.JsonElement element, String name)
     
    static boolean
    asBoolean(com.google.gson.JsonElement element, String name)
     
    static double
    asDouble(com.google.gson.JsonElement object, String name)
     
    static float
    asFloat(com.google.gson.JsonElement element, String name)
     
    static int
    asInt(com.google.gson.JsonElement element, String name)
     
    static long
    asLong(com.google.gson.JsonElement element, String name)
     
    static com.google.gson.JsonObject
    asObject(com.google.gson.JsonElement element, String name)
     
    static String
    asString(com.google.gson.JsonElement element, String name)
     
    static <T> T
    deserialize(@Nullable com.google.gson.JsonElement element, String name, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
     
    static <T> T
    deserialize(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken)
     
    static <T> T
    deserialize(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken, boolean lenient)
     
    static <T> T
    deserialize(com.google.gson.Gson gson, Reader reader, Class<T> type)
     
    static <T> T
    deserialize(com.google.gson.Gson gson, Reader reader, Class<T> type, boolean lenient)
     
    static <T> T
    deserialize(com.google.gson.Gson gson, String content, Class<T> type)
     
    static <T> T
    deserialize(com.google.gson.Gson gson, String content, Class<T> type, boolean lenient)
     
    static <T> T
    deserialize(com.google.gson.JsonObject object, String element, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
     
    static <T> T
    deserialize(com.google.gson.JsonObject object, String element, T defaultValue, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
     
    static com.google.gson.JsonObject
     
    static com.google.gson.JsonObject
    deserialize(Reader reader, boolean lenient)
     
    static com.google.gson.JsonObject
     
    static com.google.gson.JsonObject
    deserialize(String content, boolean lenient)
     
    static com.google.gson.JsonArray
     
    static com.google.gson.JsonArray
     
    static com.google.gson.JsonArray
    getArray(com.google.gson.JsonObject object, String element)
     
    static @Nullable com.google.gson.JsonArray
    getArray(com.google.gson.JsonObject object, String name, @Nullable com.google.gson.JsonArray defaultArray)
     
    static boolean
    getBoolean(com.google.gson.JsonObject object, String element)
     
    static boolean
    getBoolean(com.google.gson.JsonObject object, String element, boolean defaultBoolean)
     
    static double
    getDouble(com.google.gson.JsonObject object, String element)
     
    static double
    getDouble(com.google.gson.JsonObject object, String element, double defaultDouble)
     
    static float
    getFloat(com.google.gson.JsonObject object, String element)
     
    static float
    getFloat(com.google.gson.JsonObject object, String element, float defaultFloat)
     
    static int
    getInt(com.google.gson.JsonObject object, String element)
     
    static int
    getInt(com.google.gson.JsonObject object, String element, int defaultInt)
     
    static long
    getLong(com.google.gson.JsonObject object, String name)
     
    static long
    getLong(com.google.gson.JsonObject object, String element, long defaultLong)
     
    static com.google.gson.JsonObject
    getObject(com.google.gson.JsonObject object, String element)
     
    static @Nullable com.google.gson.JsonObject
    getObject(com.google.gson.JsonObject object, String element, @Nullable com.google.gson.JsonObject defaultObject)
     
    static String
    getString(com.google.gson.JsonObject object, String element)
     
    static @Nullable String
    getString(com.google.gson.JsonObject object, String element, @Nullable String defaultStr)
     
    static String
    getType(@Nullable com.google.gson.JsonElement element)
     
    static boolean
    hasArray(com.google.gson.JsonObject object, String element)
     
    static boolean
    hasBoolean(com.google.gson.JsonObject object, String element)
     
    static boolean
    hasElement(com.google.gson.JsonObject object, String element)
     
    static boolean
    hasJsonObject(com.google.gson.JsonObject object, String element)
     
    static boolean
    hasNumber(com.google.gson.JsonObject object, String element)
     
    static boolean
    hasPrimitive(com.google.gson.JsonObject object, String element)
     
    static boolean
    hasString(com.google.gson.JsonObject object, String element)
     
    static boolean
    isBoolean(com.google.gson.JsonElement object)
     
    static boolean
    isString(com.google.gson.JsonElement element)
     
    static <T> T
    m_boxypbwp(com.google.gson.Gson gson, Reader reader, com.google.gson.reflect.TypeToken<T> typeToken, boolean bl)
     
    static <T> T
    m_gludylcq(com.google.gson.Gson gson, String string, com.google.gson.reflect.TypeToken<T> typeToken, boolean bl)
     
    static <T> T
    m_haynlcxa(com.google.gson.Gson gson, String string, Class<T> class_, boolean bl)
     
    static <T> T
    m_vsbufiln(com.google.gson.Gson gson, Reader reader, Class<T> class_, boolean bl)
     
    static <T> T
    m_zmohitsy(com.google.gson.Gson gson, String string, com.google.gson.reflect.TypeToken<T> typeToken)
     
    static String
    toSortedString(com.google.gson.JsonElement element)
     
    static void
    writeValue(com.google.gson.stream.JsonWriter writer, @Nullable com.google.gson.JsonElement element, @Nullable Comparator<String> comparator)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonHelper

      public JsonHelper()
  • Method Details

    • hasString

      public static boolean hasString(com.google.gson.JsonObject object, String element)
    • isString

      public static boolean isString(com.google.gson.JsonElement element)
    • hasNumber

      public static boolean hasNumber(com.google.gson.JsonObject object, String element)
    • hasBoolean

      public static boolean hasBoolean(com.google.gson.JsonObject object, String element)
    • isBoolean

      public static boolean isBoolean(com.google.gson.JsonElement object)
    • hasArray

      public static boolean hasArray(com.google.gson.JsonObject object, String element)
    • hasJsonObject

      public static boolean hasJsonObject(com.google.gson.JsonObject object, String element)
    • hasPrimitive

      public static boolean hasPrimitive(com.google.gson.JsonObject object, String element)
    • hasElement

      public static boolean hasElement(com.google.gson.JsonObject object, String element)
    • asString

      public static String asString(com.google.gson.JsonElement element, String name)
    • getString

      public static String getString(com.google.gson.JsonObject object, String element)
    • getString

      @Nullable public static @Nullable String getString(com.google.gson.JsonObject object, String element, @Nullable @Nullable String defaultStr)
    • asBoolean

      public static boolean asBoolean(com.google.gson.JsonElement element, String name)
    • getBoolean

      public static boolean getBoolean(com.google.gson.JsonObject object, String element)
    • getBoolean

      public static boolean getBoolean(com.google.gson.JsonObject object, String element, boolean defaultBoolean)
    • asDouble

      public static double asDouble(com.google.gson.JsonElement object, String name)
    • getDouble

      public static double getDouble(com.google.gson.JsonObject object, String element)
    • getDouble

      public static double getDouble(com.google.gson.JsonObject object, String element, double defaultDouble)
    • asFloat

      public static float asFloat(com.google.gson.JsonElement element, String name)
    • getFloat

      public static float getFloat(com.google.gson.JsonObject object, String element)
    • getFloat

      public static float getFloat(com.google.gson.JsonObject object, String element, float defaultFloat)
    • asLong

      public static long asLong(com.google.gson.JsonElement element, String name)
    • getLong

      public static long getLong(com.google.gson.JsonObject object, String name)
    • getLong

      public static long getLong(com.google.gson.JsonObject object, String element, long defaultLong)
    • asInt

      public static int asInt(com.google.gson.JsonElement element, String name)
    • getInt

      public static int getInt(com.google.gson.JsonObject object, String element)
    • getInt

      public static int getInt(com.google.gson.JsonObject object, String element, int defaultInt)
    • asObject

      public static com.google.gson.JsonObject asObject(com.google.gson.JsonElement element, String name)
    • 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

      public static com.google.gson.JsonArray asArray(com.google.gson.JsonElement element, String name)
    • getArray

      public static com.google.gson.JsonArray getArray(com.google.gson.JsonObject object, String element)
    • 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

      public static <T> T deserialize(@Nullable @Nullable com.google.gson.JsonElement element, String name, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
    • deserialize

      public static <T> T deserialize(com.google.gson.JsonObject object, String element, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
    • deserialize

      @Nullable public static <T> T deserialize(com.google.gson.JsonObject object, String element, @Nullable T defaultValue, com.google.gson.JsonDeserializationContext context, Class<? extends T> type)
    • getType

      public static String getType(@Nullable @Nullable com.google.gson.JsonElement element)
    • m_vsbufiln

      @Nullable public static <T> T m_vsbufiln(com.google.gson.Gson gson, Reader reader, Class<T> class_, boolean bl)
    • deserialize

      public static <T> T deserialize(com.google.gson.Gson gson, Reader reader, Class<T> type, boolean lenient)
    • 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

      public static <T> T deserialize(com.google.gson.Gson gson, String content, Class<T> type, boolean lenient)
    • m_haynlcxa

      @Nullable public static <T> T m_haynlcxa(com.google.gson.Gson gson, String string, Class<T> class_, boolean bl)
    • 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

      public static <T> T deserialize(com.google.gson.Gson gson, Reader reader, Class<T> type)
    • deserialize

      public static <T> T deserialize(com.google.gson.Gson gson, String content, Class<T> type)
    • deserialize

      public static com.google.gson.JsonObject deserialize(String content, boolean lenient)
    • deserialize

      public static com.google.gson.JsonObject deserialize(Reader reader, boolean lenient)
    • deserialize

      public static com.google.gson.JsonObject deserialize(String content)
    • deserialize

      public static com.google.gson.JsonObject deserialize(Reader reader)
    • deserializeArray

      public static com.google.gson.JsonArray deserializeArray(String content)
    • deserializeArray

      public static com.google.gson.JsonArray deserializeArray(Reader reader)
    • toSortedString

      public static String toSortedString(com.google.gson.JsonElement element)
    • 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