List of usage examples for com.google.gson JsonSerializer interface-usage
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.actionml.DateTimeAdapter.java
/** * @author The ActionML Team (<a href="http://actionml.com">http://actionml.com</a>) * 04.02.17 16:51 */ public class DateTimeAdapter implements JsonSerializer<DateTime>, JsonDeserializer<DateTime> {
From source file com.aliakseipilko.flightdutytracker.utils.FlightSerialiser.java
public class FlightSerialiser implements JsonSerializer<Flight> { @Override public JsonElement serialize(final Flight src, Type typeOfSrc, JsonSerializationContext context) { final JsonObject jsonObject = new JsonObject();
From source file com.alignace.chargeio.mapper.gson.adapter.TokenReferenceAdapter.java
public class TokenReferenceAdapter implements JsonSerializer<TokenReferenceOption> { public JsonElement serialize(TokenReferenceOption src, Type typeOfSrc, JsonSerializationContext context) { return context.serialize(src.getTokenId(), String.class); }
From source file com.android.volley.DateFormatter.java
/** * Formatter for date formats present in the GitHub v2 and v3 API. */ public class DateFormatter implements JsonDeserializer<Date>, JsonSerializer<Date> { private final DateFormat[] formats;
From source file com.appslandia.common.json.DateAdapter.java
/** * * @author <a href="mailto:haducloc13@gmail.com">Loc Ha</a> */ public class DateAdapter implements JsonSerializer<java.util.Date>, JsonDeserializer<java.util.Date> {
From source file com.appslandia.common.json.LocalDateAdapter.java
/** * * @author <a href="mailto:haducloc13@gmail.com">Loc Ha</a> * */ public class LocalDateAdapter implements JsonSerializer<LocalDate>, JsonDeserializer<LocalDate> {
From source file com.appslandia.common.json.LocalDateTimeAdapter.java
/** * * @author <a href="mailto:haducloc13@gmail.com">Loc Ha</a> * */ public class LocalDateTimeAdapter implements JsonSerializer<LocalDateTime>, JsonDeserializer<LocalDateTime> {
From source file com.appslandia.common.json.LocalTimeAdapter.java
/** * * @author <a href="mailto:haducloc13@gmail.com">Loc Ha</a> * */ public class LocalTimeAdapter implements JsonSerializer<LocalTime>, JsonDeserializer<LocalTime> {