package com.massivecraft.factions.adapter; import java.lang.reflect.Type; import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext; import com.massivecraft.mcore.xlib.gson.JsonDeserializer; import com.massivecraft.mcore.xlib.gson.JsonElement; import com.massivecraft.mcore.xlib.gson.JsonParseException; import com.massivecraft.factions.Rel; public class RelAdapter implements JsonDeserializer { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // private static RelAdapter i = new RelAdapter(); public static RelAdapter get() { return i; } // -------------------------------------------- // // OVERRIDE // -------------------------------------------- // @Override public Rel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { return Rel.parse(json.getAsString()); } }