List of usage examples for com.google.gson JsonDeserializer interface-usage
From source file com.arcbees.vcs.github.util.GitHubPullRequestsTypeAdapter.java
public class GitHubPullRequestsTypeAdapter implements JsonDeserializer<GitHubPullRequests> { @Override public GitHubPullRequests deserialize(JsonElement json, Type typeOfT, final JsonDeserializationContext context) throws JsonParseException { JsonArray jsonArray = json.getAsJsonArray();
From source file com.arcbees.vcs.util.GsonDateTypeAdapter.java
public class GsonDateTypeAdapter implements JsonDeserializer<Date> { private static final DateFormat DATE_TIME_FORMAT = DateFormat.getDateTimeInstance(); private static final DateFormat DATE_TIME_LONG_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); private static final DateFormat DATE_TIME_LONG_FORMAT_ALT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); private static final Pattern DATE_TIME_LONG_FORMAT_PATTERN = Pattern .compile("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(\\d{3}).\\d{2}:\\d{2}");
From source file com.arcbees.vcs.util.PolymorphicTypeAdapter.java
public class PolymorphicTypeAdapter<T> implements JsonSerializer<T>, JsonDeserializer<T> { private static final String CLASSNAME = "@class"; private static final String VALUE = "@value"; @Override public T deserialize(JsonElement json, Type type, JsonDeserializationContext context)
From source file com.ariadnext.idcheckio.invoker.JSON.java
class DateAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> { private final ApiClient apiClient; /** * Constructor for DateAdapter *
From source file com.asakusafw.lang.inspection.json.JsonAdapter.java
/** * JSON adapter. * @param <T> the target type */ public interface JsonAdapter<T> extends JsonSerializer<T>, JsonDeserializer<T> {
From source file com.atlauncher.data.loaders.forge.DownloadsTypeAdapter.java
public class DownloadsTypeAdapter implements JsonDeserializer<Downloads> { @Override public Downloads deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { DownloadsItem artifact = null;
From source file com.atlauncher.data.mojang.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 com.atlauncher.data.mojang.DownloadsTypeAdapter.java
public class DownloadsTypeAdapter implements JsonDeserializer<Downloads> { @Override public Downloads deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { DownloadsItem artifact = null; Map<String, DownloadsItem> classifiers = new HashMap<String, DownloadsItem>();
From source file com.atlauncher.data.mojang.MojangArgumentsTypeAdapter.java
public class MojangArgumentsTypeAdapter implements JsonDeserializer<MojangArguments> { @Override public MojangArguments deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { List<ArgumentRule> game = new ArrayList<ArgumentRule>(); List<ArgumentRule> jvm = new ArrayList<ArgumentRule>();
From source file com.auth0.android.lock.internal.configuration.GsonDeserializer.java
abstract class GsonDeserializer<T> implements JsonDeserializer<T> { <U> U requiredValue(String name, Type type, JsonObject object, JsonDeserializationContext context) throws JsonParseException { U value = context.deserialize(object.get(name), type); if (value == null) {