public class JsonUtils
extends java.lang.Object
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 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_193841_0_,
java.io.Reader p_193841_1_,
java.lang.reflect.Type p_193841_2_) |
static <T> T |
fromJson(com.google.gson.Gson p_193838_0_,
java.io.Reader p_193838_1_,
java.lang.reflect.Type p_193838_2_,
boolean p_193838_3_) |
static <T> T |
fromJson(com.google.gson.Gson p_193837_0_,
java.lang.String p_193837_1_,
java.lang.reflect.Type p_193837_2_,
boolean p_193837_3_) |
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 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 <T> T |
gsonDeserialize(com.google.gson.Gson gsonIn,
java.io.Reader readerIn,
java.lang.Class<T> adapter,
boolean lenient) |
static <T> T |
gsonDeserialize(com.google.gson.Gson gsonIn,
java.lang.String json,
java.lang.Class<T> adapter) |
static <T> T |
gsonDeserialize(com.google.gson.Gson gsonIn,
java.lang.String json,
java.lang.Class<T> adapter,
boolean lenient) |
static <T> T |
gsonDeserialize(com.google.gson.Gson p_193840_0_,
java.lang.String p_193840_1_,
java.lang.reflect.Type p_193840_2_) |
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 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 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)
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 gsonDeserialize(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 p_193838_0_, java.io.Reader p_193838_1_, java.lang.reflect.Type p_193838_2_, boolean p_193838_3_)
@Nullable public static <T> T fromJson(com.google.gson.Gson p_193837_0_, java.lang.String p_193837_1_, java.lang.reflect.Type p_193837_2_, boolean p_193837_3_)
@Nullable public static <T> T gsonDeserialize(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 p_193841_0_, java.io.Reader p_193841_1_, java.lang.reflect.Type p_193841_2_)
@Nullable public static <T> T gsonDeserialize(com.google.gson.Gson p_193840_0_, java.lang.String p_193840_1_, java.lang.reflect.Type p_193840_2_)
@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_)
@Nullable public static <T> T gsonDeserialize(com.google.gson.Gson gsonIn, java.lang.String json, java.lang.Class<T> adapter)