List of usage examples for com.google.gson JsonDeserializer interface-usage
From source file co.cask.cdap.proto.codec.EntityIdTypeAdapter.java
/** * Class for serialize/deserialize EntityId object to/from json through {@link com.google.gson.Gson Gson}. */ public final class EntityIdTypeAdapter implements JsonSerializer<EntityId>, JsonDeserializer<EntityId> { @Override
From source file co.cask.cdap.proto.codec.IdTypeAdapter.java
/** * Class for serialize/deserialize Id object to/from json through {@link com.google.gson.Gson Gson}. * Uses {@link EntityId} as the actual object to be serialized and deserialized. */ public final class IdTypeAdapter implements JsonSerializer<Id>, JsonDeserializer<Id> {
From source file co.cask.tigon.internal.app.AbstractSpecificationCodec.java
/** * Abstract base class to provides common methods for all Codec. * * @param <T> The specification type that this codec handle. */ abstract class AbstractSpecificationCodec<T> implements JsonSerializer<T>, JsonDeserializer<T> {
From source file co.forsaken.projectindigo.utils.mojangtokens.DateTypeAdapter.java
public class DateTypeAdapter implements JsonDeserializer<Date>, JsonSerializer<Date> { private final DateFormat enUsFormat = DateFormat.getDateTimeInstance(2, 2, Locale.US); private final DateFormat iso8601Format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); @Override public Date deserialize(JsonElement json, Type type, JsonDeserializationContext context)
From source file co.uk.crowdemotion.JSON.java
class DateAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> { private final ApiClient apiClient; /** * Constructor for DateAdapter *
From source file co.waitlisted.JSON.java
class DateAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> { private final ApiClient apiClient; /** * Constructor for DateAdapter *
From source file com.aaasec.sigserv.cscommon.json.DateTypeAdapter.java
/** * Date format adapter for Gson. */ public class DateTypeAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> { private final DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
From source file com.actimem.blog.gson.customtypes.CompanyIdAdapter.java
public class CompanyIdAdapter implements JsonSerializer<CompanyId>, JsonDeserializer<CompanyId> { @Override public CompanyId deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { return new CompanyId(json.getAsString()); }
From source file com.actimem.blog.gson.customtypes.DateTimeAdapter.java
public class DateTimeAdapter implements JsonSerializer<DateTime>, JsonDeserializer<DateTime> { @Override public DateTime deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { return new DateTime(json.getAsString()); }
From source file com.actimem.blog.gson.immutable.CompanyDeserializer.java
public class CompanyDeserializer implements JsonDeserializer<Company> { @Override public Company deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { JsonObject jsonObject = json.getAsJsonObject(); String name = jsonObject.get("name").getAsString();