Class JsonUtils
java.lang.Object
com.mojang.realmsclient.util.JsonUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetBooleanOr(String key, JsonObject node, boolean defaultValue) static InstantgetDateOr(String key, JsonObject node) getEpochMillisOr(String key, JsonObject node, @Nullable Instant defaultValue) static intgetIntOr(String key, JsonObject node, int defaultValue) static longgetLongOr(String key, JsonObject node, long defaultValue) static <T> @Nullable TgetOptional(String key, JsonObject node, Function<JsonObject, T> parser) static <T> TgetRequired(String key, JsonObject node, Function<JsonObject, T> parser) static StringgetRequiredString(String key, JsonObject node) static URIgetRequiredUri(String key, JsonObject node) getStringOr(String key, JsonObject node, @Nullable String defaultValue) getUriNullable(String key, JsonObject node) getUuidOr(String key, JsonObject node, @Nullable UUID defaultValue)
-
Constructor Details
-
JsonUtils
public JsonUtils()
-
-
Method Details
-
getRequired
-
getOptional
public static <T> @Nullable T getOptional(String key, JsonObject node, Function<JsonObject, T> parser) -
getRequiredString
-
getStringOr
-
getRequiredUri
-
getUriNullable
-
getUuidOr
-
getIntOr
-
getLongOr
-
getBooleanOr
-
getDateOr
-
getEpochMillisOr
-