Package com.mojang.realmsclient.util
Class JsonUtils
java.lang.Object
com.mojang.realmsclient.util.JsonUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetBooleanOr(String pKey, JsonObject pJson, boolean pDefaultValue) static DategetDateOr(String pKey, JsonObject pJson) static intgetIntOr(String pKey, JsonObject pJson, int pDefaultValue) static longgetLongOr(String pKey, JsonObject pJson, long pDefaultValue) static <T> TgetOptional(String pKey, JsonObject pJson, Function<JsonObject, T> pOutput) static <T> TgetRequired(String pKey, JsonObject pJson, Function<JsonObject, T> pOutput) static StringgetRequiredString(String pKey, JsonObject pJson) static StringgetRequiredStringOr(String pKey, JsonObject pJson, String pDefaultValue) static StringgetStringOr(String pKey, JsonObject pJson, String pDefaultValue) static UUIDgetUuidOr(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
-