Class SpawnInfoTypeAdapter

java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.util.SpawnInfoTypeAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<SpawnInfo>, com.google.gson.JsonSerializer<SpawnInfo>

public class SpawnInfoTypeAdapter extends Object implements com.google.gson.JsonSerializer<SpawnInfo>, com.google.gson.JsonDeserializer<SpawnInfo>
JSON adapter used for serializing and deserializing SpawnInfos.
  • Constructor Details

    • SpawnInfoTypeAdapter

      public SpawnInfoTypeAdapter()
  • Method Details

    • deserialize

      public SpawnInfo deserialize(com.google.gson.JsonElement element, Type type, com.google.gson.JsonDeserializationContext ctx) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<SpawnInfo>
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize(SpawnInfo spawnInfo, Type type, com.google.gson.JsonSerializationContext ctx)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<SpawnInfo>