public class JsonHelper
extends java.lang.Object
Constructor and Description |
---|
JsonHelper() |
Modifier and Type | Method and Description |
---|---|
static <T> com.google.common.collect.ImmutableList<T> |
deserializeList(com.google.gson.JsonArray array,
java.util.function.Function<com.google.gson.JsonElement,T> deserializer) |
static <T> T |
getOrDefault(com.google.gson.JsonObject object,
java.lang.String key,
java.lang.Class<T> type,
T def,
com.google.gson.JsonDeserializationContext context) |
static net.minecraft.util.NonNullList<QuantifiedIngredient> |
quantifiedItemsFromJson(com.google.gson.JsonArray ingredients) |
static <T> com.google.gson.JsonArray |
serializeList(java.util.Collection<T> collection,
java.util.function.Function<T,com.google.gson.JsonElement> serializer) |
public static <T> T getOrDefault(com.google.gson.JsonObject object, java.lang.String key, java.lang.Class<T> type, T def, com.google.gson.JsonDeserializationContext context)
public static <T> com.google.gson.JsonArray serializeList(java.util.Collection<T> collection, java.util.function.Function<T,com.google.gson.JsonElement> serializer)
public static <T> com.google.common.collect.ImmutableList<T> deserializeList(com.google.gson.JsonArray array, java.util.function.Function<com.google.gson.JsonElement,T> deserializer)
public static net.minecraft.util.NonNullList<QuantifiedIngredient> quantifiedItemsFromJson(com.google.gson.JsonArray ingredients)