Class DeckCardTypeAdapter
java.lang.Object
com.pixelmonmod.tcg.api.typeadapters.DeckCardTypeAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<ImmutableCard>
,com.google.gson.JsonSerializer<ImmutableCard>
public class DeckCardTypeAdapter
extends Object
implements com.google.gson.JsonDeserializer<ImmutableCard>, com.google.gson.JsonSerializer<ImmutableCard>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) com.google.gson.JsonElement
serialize
(ImmutableCard src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
Constructor Details
-
DeckCardTypeAdapter
public DeckCardTypeAdapter()
-
-
Method Details
-
deserialize
public ImmutableCard 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<ImmutableCard>
- Throws:
com.google.gson.JsonParseException
-
serialize
public com.google.gson.JsonElement serialize(ImmutableCard src, Type typeOfSrc, com.google.gson.JsonSerializationContext context) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<ImmutableCard>
-