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 key, JsonObject json, boolean defaultValue) static DategetDateOr(String key, JsonObject json) static intgetIntOr(String key, JsonObject json, int defaultValue) static longgetLongOr(String key, JsonObject json, long defaultValue) static <T> TgetOptional(String key, JsonObject json, Function<JsonObject, T> output) static <T> TgetRequired(String key, JsonObject json, Function<JsonObject, T> output) static StringgetRequiredString(String key, JsonObject json) static StringgetRequiredStringOr(String key, JsonObject json, String defaultValue) static StringgetStringOr(String key, JsonObject json, String defaultValue) static UUIDgetUuidOr(String key, JsonObject json, UUID defaultValue)
-
Constructor Details
-
JsonUtils
public JsonUtils()
-
-
Method Details
-
getRequired
-
getOptional
@Nullable public static <T> T getOptional(String key, JsonObject json, Function<JsonObject, T> output) -
getRequiredString
-
getRequiredStringOr
-
getStringOr
@Nullable public static String getStringOr(String key, JsonObject json, @Nullable String defaultValue) -
getUuidOr
-
getIntOr
-
getLongOr
-
getBooleanOr
-
getDateOr
-