List of usage examples for com.google.gson JsonDeserializer interface-usage
From source file abtlibrary.utils.as24ApiClient.JSON.java
class DateAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> { private final ApiClient apiClient; /** * Constructor for DateAdapter *
From source file allout58.mods.techtree.tree.ItemStackGSON.java
/** * Created by James Hollowell on 12/29/2014. */ public class ItemStackGSON implements JsonSerializer<ItemStack>, JsonDeserializer<ItemStack> { @Override
From source file allout58.mods.techtree.tree.TechNodeGSON.java
/** * Created by James Hollowell on 12/7/2014. */ //This has to be registered with the GsonBuilder //EXAMPLE: gsonBuilder.registerTypeAdapter(TechNode.class, new TechNodeGSON());
From source file ar.com.wolox.wolmo.networking.retrofit.serializer.LocalDateSerializer.java
/**
* Transforms a serialized {@link JsonElement} representing a {@link java.util.Date} into
* a {@link LocalDate} instance. It also works the other way around, serializing a {@link LocalDate}
* into a {@link JsonElement}.
* <p>
* This class is useful for sending and receiving {@link java.util.Date} instances over the network.
From source file at.ac.tuwien.big.we14.lab2.api.impl.JSONQuestionDataProvider.java
class CategoryDeserializer implements JsonDeserializer<Category> { private QuizFactory factory; public CategoryDeserializer(QuizFactory factory) { this.factory = factory;
From source file at.ac.uniklu.mobile.sportal.api.GsonNotificationTypeDeserializer.java
/**
* Custom deserializer for the {@link Notification.Type} enumeration. This is needed since
* new types of notification can be implemented and returned by the server without being
* supported on the client (e.g. because it's an old client version). Normally this would
* provoke an exception and the deserialization fails, in this special case the type gets
* set to UNKNOWN so it can be ignored by the client and normal processing continues.
From source file at.maui.cheapcast.json.deserializer.ProtocolMessageDeserializer.java
public class ProtocolMessageDeserializer implements JsonDeserializer<ProtocolMessage> { @Override public ProtocolMessage deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { ProtocolMessage pm;
From source file at.maui.cheapcast.json.deserializer.RampMessageDeserializer.java
public class RampMessageDeserializer implements JsonDeserializer<RampMessage> { public static final String LOG_TAG = "RampMessageDeserializer"; @Override public RampMessage deserialize(JsonElement jsonElement, Type type,
From source file at.pcgamingfreaks.Bukkit.Message.MessageComponent.java
public final class MessageComponent extends at.pcgamingfreaks.Message.MessageComponent<MessageComponent, ChatColor> implements JsonDeserializer<MessageComponent> { //region Reflection Variables private static final transient Class<?> CRAFT_STATISTIC = NMSReflection.getOBCClass("CraftStatistic"); private static final transient Method GET_NMS_ACHIEVEMENT = NMSReflection.getMethod(CRAFT_STATISTIC, "getNMSAchievement", Achievement.class);
From source file at.pcgamingfreaks.Bungee.Message.MessageComponent.java
public final class MessageComponent extends at.pcgamingfreaks.Message.MessageComponent<MessageComponent, ChatColor> implements JsonDeserializer<MessageComponent> { private static final transient at.pcgamingfreaks.Message.MessageComponent NEW_LINE_HELPER = new MessageComponent( "\n"); private static final transient MessageComponent MESSAGE_COMPONENT_INSTANCE = new MessageComponent();