Package com.mojang.realmsclient.util
Class JsonUtils
java.lang.Object
com.mojang.realmsclient.util.JsonUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
getBooleanOr
(String pKey, JsonObject pJson, boolean pDefaultValue) static Date
getDateOr
(String pKey, JsonObject pJson) static int
getIntOr
(String pKey, JsonObject pJson, int pDefaultValue) static long
getLongOr
(String pKey, JsonObject pJson, long pDefaultValue) static <T> T
getOptional
(String pKey, JsonObject pJson, Function<JsonObject, T> pOutput) static <T> T
getRequired
(String pKey, JsonObject pJson, Function<JsonObject, T> pOutput) static String
getRequiredString
(String pKey, JsonObject pJson) static String
getRequiredStringOr
(String pKey, JsonObject pJson, String pDefaultValue) static String
getStringOr
(String pKey, JsonObject pJson, String pDefaultValue) static UUID
getUuidOr
(String pKey, JsonObject pJson, UUID pDefaultValue)
-
Constructor Details
-
JsonUtils
public JsonUtils()
-
-
Method Details
-
getRequired
-
getOptional
@Nullable public static <T> T getOptional(String pKey, JsonObject pJson, Function<JsonObject, T> pOutput) -
getRequiredString
-
getRequiredStringOr
-
getStringOr
@Nullable public static String getStringOr(String pKey, JsonObject pJson, @Nullable String pDefaultValue) -
getUuidOr
-
getIntOr
-
getLongOr
-
getBooleanOr
-
getDateOr
-