Class ThemeDeckTypeAdapter

java.lang.Object
com.pixelmonmod.tcg.api.typeadapters.ThemeDeckTypeAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<ThemeDeck>, com.google.gson.JsonSerializer<ThemeDeck>

public class ThemeDeckTypeAdapter extends Object implements com.google.gson.JsonSerializer<ThemeDeck>, com.google.gson.JsonDeserializer<ThemeDeck>
  • Constructor Details

    • ThemeDeckTypeAdapter

      public ThemeDeckTypeAdapter()
  • Method Details

    • deserialize

      public ThemeDeck deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<ThemeDeck>
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize(ThemeDeck src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<ThemeDeck>
    • getCardsFromJSONArray

      protected List<ImmutableCard> getCardsFromJSONArray(com.google.gson.JsonArray cardsArray)