Class ResourceLocationTypeAdapter
java.lang.Object
com.pixelmonmod.tcg.api.typeadapters.ResourceLocationTypeAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<net.minecraft.resources.ResourceLocation>
,com.google.gson.JsonSerializer<net.minecraft.resources.ResourceLocation>
public class ResourceLocationTypeAdapter
extends Object
implements com.google.gson.JsonSerializer<net.minecraft.resources.ResourceLocation>, com.google.gson.JsonDeserializer<net.minecraft.resources.ResourceLocation>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocation
deserialize
(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) com.google.gson.JsonElement
serialize
(net.minecraft.resources.ResourceLocation src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
Constructor Details
-
ResourceLocationTypeAdapter
public ResourceLocationTypeAdapter()
-
-
Method Details
-
deserialize
public net.minecraft.resources.ResourceLocation deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException - Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<net.minecraft.resources.ResourceLocation>
- Throws:
com.google.gson.JsonParseException
-
serialize
public com.google.gson.JsonElement serialize(net.minecraft.resources.ResourceLocation src, Type typeOfSrc, com.google.gson.JsonSerializationContext context) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<net.minecraft.resources.ResourceLocation>
-