类 JsonUtils

java.lang.Object
com.mojang.realmsclient.util.JsonUtils

public class JsonUtils extends Object
  • 构造器详细资料

    • JsonUtils

      public JsonUtils()
  • 方法详细资料

    • getRequired

      public static <T> T getRequired(String pKey, com.google.gson.JsonObject pJson, Function<com.google.gson.JsonObject,T> pOutput)
    • getRequiredString

      public static String getRequiredString(String pKey, com.google.gson.JsonObject pJson)
    • getStringOr

      @Nullable public static String getStringOr(String pKey, com.google.gson.JsonObject pJson, @Nullable String pDefaultValue)
    • getUuidOr

      @Nullable public static UUID getUuidOr(String pKey, com.google.gson.JsonObject pJson, @Nullable UUID pDefaultValue)
    • getIntOr

      public static int getIntOr(String pKey, com.google.gson.JsonObject pJson, int pDefaultValue)
    • getLongOr

      public static long getLongOr(String pKey, com.google.gson.JsonObject pJson, long pDefaultValue)
    • getBooleanOr

      public static boolean getBooleanOr(String pKey, com.google.gson.JsonObject pJson, boolean pDefaultValue)
    • getDateOr

      public static Date getDateOr(String pKey, com.google.gson.JsonObject pJson)