public class JSONUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static com.google.gson.Gson |
field_212747_a |
Constructor and Description |
---|
JSONUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
deserializeClass(com.google.gson.JsonElement json,
java.lang.String memberName,
com.google.gson.JsonDeserializationContext context,
java.lang.Class<? extends T> adapter) |
static <T> T |
deserializeClass(com.google.gson.JsonObject json,
java.lang.String memberName,
com.google.gson.JsonDeserializationContext context,
java.lang.Class<? extends T> adapter) |
static <T> T |
deserializeClass(com.google.gson.JsonObject json,
java.lang.String memberName,
T fallback,
com.google.gson.JsonDeserializationContext context,
java.lang.Class<? extends T> adapter) |
static <T> T |
fromJson(com.google.gson.Gson gson,
java.io.Reader reader,
java.lang.Class<T> jsonClass) |
static <T> T |
fromJson(com.google.gson.Gson gsonIn,
java.io.Reader readerIn,
java.lang.Class<T> adapter,
boolean lenient) |
static <T> T |
fromJson(com.google.gson.Gson gson,
java.io.Reader reader,
java.lang.reflect.Type type) |
static <T> T |
fromJson(com.google.gson.Gson gson,
java.io.Reader reader,
java.lang.reflect.Type type,
boolean lenient) |
static <T> T |
fromJson(com.google.gson.Gson gsonIn,
java.lang.String json,
java.lang.Class<T> adapter) |
static <T> T |
fromJson(com.google.gson.Gson gsonIn,
java.lang.String json,
java.lang.Class<T> adapter,
boolean lenient) |
static <T> T |
fromJson(com.google.gson.Gson gson,
java.lang.String json,
java.lang.reflect.Type type) |
static <T> T |
fromJson(com.google.gson.Gson gson,
java.lang.String json,
java.lang.reflect.Type type,
boolean lenient) |
static com.google.gson.JsonObject |
fromJson(java.io.Reader p_212743_0_) |
static com.google.gson.JsonObject |
fromJson(java.io.Reader p_212744_0_,
boolean p_212744_1_) |
static com.google.gson.JsonObject |
fromJson(java.lang.String p_212745_0_) |
static com.google.gson.JsonObject |
fromJson(java.lang.String p_212746_0_,
boolean p_212746_1_) |
static long |
func_219794_f(com.google.gson.JsonElement p_219794_0_,
java.lang.String p_219794_1_) |
static byte |
func_219795_a(com.google.gson.JsonObject p_219795_0_,
java.lang.String p_219795_1_,
byte p_219795_2_) |
static long |
func_219796_a(com.google.gson.JsonObject p_219796_0_,
java.lang.String p_219796_1_,
long p_219796_2_) |
static long |
func_226161_m_(com.google.gson.JsonObject p_226161_0_,
java.lang.String p_226161_1_) |
static boolean |
getBoolean(com.google.gson.JsonElement json,
java.lang.String memberName) |
static boolean |
getBoolean(com.google.gson.JsonObject json,
java.lang.String memberName) |
static boolean |
getBoolean(com.google.gson.JsonObject json,
java.lang.String memberName,
boolean fallback) |
static byte |
getByte(com.google.gson.JsonElement json,
java.lang.String memberName) |
static float |
getFloat(com.google.gson.JsonElement json,
java.lang.String memberName) |
static float |
getFloat(com.google.gson.JsonObject json,
java.lang.String memberName) |
static float |
getFloat(com.google.gson.JsonObject json,
java.lang.String memberName,
float fallback) |
static int |
getInt(com.google.gson.JsonElement json,
java.lang.String memberName) |
static int |
getInt(com.google.gson.JsonObject json,
java.lang.String memberName) |
static int |
getInt(com.google.gson.JsonObject json,
java.lang.String memberName,
int fallback) |
static Item |
getItem(com.google.gson.JsonElement json,
java.lang.String memberName) |
static Item |
getItem(com.google.gson.JsonObject json,
java.lang.String memberName) |
static com.google.gson.JsonArray |
getJsonArray(com.google.gson.JsonElement json,
java.lang.String memberName) |
static com.google.gson.JsonArray |
getJsonArray(com.google.gson.JsonObject json,
java.lang.String memberName) |
static com.google.gson.JsonArray |
getJsonArray(com.google.gson.JsonObject json,
java.lang.String memberName,
com.google.gson.JsonArray fallback) |
static com.google.gson.JsonObject |
getJsonObject(com.google.gson.JsonElement json,
java.lang.String memberName) |
static com.google.gson.JsonObject |
getJsonObject(com.google.gson.JsonObject json,
java.lang.String memberName) |
static com.google.gson.JsonObject |
getJsonObject(com.google.gson.JsonObject json,
java.lang.String memberName,
com.google.gson.JsonObject fallback) |
static java.lang.String |
getString(com.google.gson.JsonElement json,
java.lang.String memberName) |
static java.lang.String |
getString(com.google.gson.JsonObject json,
java.lang.String memberName) |
static java.lang.String |
getString(com.google.gson.JsonObject json,
java.lang.String memberName,
java.lang.String fallback) |
static boolean |
hasField(com.google.gson.JsonObject json,
java.lang.String memberName) |
static boolean |
isBoolean(com.google.gson.JsonObject json,
java.lang.String memberName) |
static boolean |
isJsonArray(com.google.gson.JsonObject json,
java.lang.String memberName) |
static boolean |
isJsonPrimitive(com.google.gson.JsonObject json,
java.lang.String memberName) |
static boolean |
isNumber(com.google.gson.JsonElement json) |
static boolean |
isString(com.google.gson.JsonElement json) |
static boolean |
isString(com.google.gson.JsonObject json,
java.lang.String memberName) |
static java.lang.String |
toString(com.google.gson.JsonElement json) |
public static boolean isString(com.google.gson.JsonObject json, java.lang.String memberName)
public static boolean isString(com.google.gson.JsonElement json)
public static boolean isNumber(com.google.gson.JsonElement json)
public static boolean isBoolean(com.google.gson.JsonObject json, java.lang.String memberName)
public static boolean isJsonArray(com.google.gson.JsonObject json, java.lang.String memberName)
public static boolean isJsonPrimitive(com.google.gson.JsonObject json, java.lang.String memberName)
public static boolean hasField(com.google.gson.JsonObject json, java.lang.String memberName)
public static java.lang.String getString(com.google.gson.JsonElement json, java.lang.String memberName)
public static java.lang.String getString(com.google.gson.JsonObject json, java.lang.String memberName)
public static java.lang.String getString(com.google.gson.JsonObject json, java.lang.String memberName, java.lang.String fallback)
public static Item getItem(com.google.gson.JsonElement json, java.lang.String memberName)
public static Item getItem(com.google.gson.JsonObject json, java.lang.String memberName)
public static boolean getBoolean(com.google.gson.JsonElement json, java.lang.String memberName)
public static boolean getBoolean(com.google.gson.JsonObject json, java.lang.String memberName)
public static boolean getBoolean(com.google.gson.JsonObject json, java.lang.String memberName, boolean fallback)
public static float getFloat(com.google.gson.JsonElement json, java.lang.String memberName)
public static float getFloat(com.google.gson.JsonObject json, java.lang.String memberName)
public static float getFloat(com.google.gson.JsonObject json, java.lang.String memberName, float fallback)
public static long func_219794_f(com.google.gson.JsonElement p_219794_0_, java.lang.String p_219794_1_)
public static long func_226161_m_(com.google.gson.JsonObject p_226161_0_, java.lang.String p_226161_1_)
public static long func_219796_a(com.google.gson.JsonObject p_219796_0_, java.lang.String p_219796_1_, long p_219796_2_)
public static int getInt(com.google.gson.JsonElement json, java.lang.String memberName)
public static int getInt(com.google.gson.JsonObject json, java.lang.String memberName)
public static int getInt(com.google.gson.JsonObject json, java.lang.String memberName, int fallback)
public static byte getByte(com.google.gson.JsonElement json, java.lang.String memberName)
public static byte func_219795_a(com.google.gson.JsonObject p_219795_0_, java.lang.String p_219795_1_, byte p_219795_2_)
public static com.google.gson.JsonObject getJsonObject(com.google.gson.JsonElement json, java.lang.String memberName)
public static com.google.gson.JsonObject getJsonObject(com.google.gson.JsonObject json, java.lang.String memberName)
public static com.google.gson.JsonObject getJsonObject(com.google.gson.JsonObject json, java.lang.String memberName, com.google.gson.JsonObject fallback)
public static com.google.gson.JsonArray getJsonArray(com.google.gson.JsonElement json, java.lang.String memberName)
public static com.google.gson.JsonArray getJsonArray(com.google.gson.JsonObject json, java.lang.String memberName)
@Nullable public static com.google.gson.JsonArray getJsonArray(com.google.gson.JsonObject json, java.lang.String memberName, @Nullable com.google.gson.JsonArray fallback)
public static <T> T deserializeClass(@Nullable com.google.gson.JsonElement json, java.lang.String memberName, com.google.gson.JsonDeserializationContext context, java.lang.Class<? extends T> adapter)
public static <T> T deserializeClass(com.google.gson.JsonObject json, java.lang.String memberName, com.google.gson.JsonDeserializationContext context, java.lang.Class<? extends T> adapter)
public static <T> T deserializeClass(com.google.gson.JsonObject json, java.lang.String memberName, T fallback, com.google.gson.JsonDeserializationContext context, java.lang.Class<? extends T> adapter)
public static java.lang.String toString(com.google.gson.JsonElement json)
@Nullable public static <T> T fromJson(com.google.gson.Gson gsonIn, java.io.Reader readerIn, java.lang.Class<T> adapter, boolean lenient)
@Nullable public static <T> T fromJson(com.google.gson.Gson gson, java.io.Reader reader, java.lang.reflect.Type type, boolean lenient)
@Nullable public static <T> T fromJson(com.google.gson.Gson gson, java.lang.String json, java.lang.reflect.Type type, boolean lenient)
@Nullable public static <T> T fromJson(com.google.gson.Gson gsonIn, java.lang.String json, java.lang.Class<T> adapter, boolean lenient)
@Nullable public static <T> T fromJson(com.google.gson.Gson gson, java.io.Reader reader, java.lang.reflect.Type type)
@Nullable public static <T> T fromJson(com.google.gson.Gson gson, java.lang.String json, java.lang.reflect.Type type)
@Nullable public static <T> T fromJson(com.google.gson.Gson gson, java.io.Reader reader, java.lang.Class<T> jsonClass)
@Nullable public static <T> T fromJson(com.google.gson.Gson gsonIn, java.lang.String json, java.lang.Class<T> adapter)
public static com.google.gson.JsonObject fromJson(java.lang.String p_212746_0_, boolean p_212746_1_)
public static com.google.gson.JsonObject fromJson(java.io.Reader p_212744_0_, boolean p_212744_1_)
public static com.google.gson.JsonObject fromJson(java.lang.String p_212745_0_)
public static com.google.gson.JsonObject fromJson(java.io.Reader p_212743_0_)