Class JsonHelper

java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.JsonHelper

public class JsonHelper extends Object
  • Constructor Details

    • JsonHelper

      public JsonHelper()
  • Method Details

    • getOrDefault

      public static <T> T getOrDefault(com.google.gson.JsonObject object, String key, Class<T> type, T def, com.google.gson.JsonDeserializationContext context)
    • serializeList

      public static <T> com.google.gson.JsonArray serializeList(Collection<T> collection, Function<T,com.google.gson.JsonElement> serializer)
    • deserializeList

      public static <T> com.google.common.collect.ImmutableList<T> deserializeList(com.google.gson.JsonArray array, Function<com.google.gson.JsonElement,T> deserializer)
    • quantifiedItemsFromJson

      public static net.minecraft.core.NonNullList<QuantifiedIngredient> quantifiedItemsFromJson(com.google.gson.JsonArray ingredients)