List of usage examples for com.google.gson JsonDeserializer interface-usage
From source file co.cask.cdap.etl.spark.batch.InputFormatProviderTypeAdapter.java
/** * Type adapter for {@link InputFormatProvider} */ public class InputFormatProviderTypeAdapter implements JsonSerializer<InputFormatProvider>, JsonDeserializer<InputFormatProvider> { private static final Type mapType = new TypeToken<Map<String, String>>() {
From source file co.cask.cdap.etl.spark.batch.OutputFormatProviderTypeAdapter.java
/** * Type adapter for {@link OutputFormatProvider} */ public class OutputFormatProviderTypeAdapter implements JsonSerializer<OutputFormatProvider>, JsonDeserializer<OutputFormatProvider> { private static final Type mapType = new TypeToken<Map<String, String>>() {
From source file co.cask.cdap.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.cask.cdap.internal.app.runtime.artifact.ArtifactRangeCodec.java
/** * Gson serialize and deserialize {@link ArtifactRange}. */ public class ArtifactRangeCodec implements JsonDeserializer<ArtifactRange>, JsonSerializer<ArtifactRange> { @Override
From source file co.cask.cdap.internal.app.runtime.codec.ArgumentsCodec.java
/** * A Gson codec for {@link Arguments}. */ public class ArgumentsCodec implements JsonSerializer<Arguments>, JsonDeserializer<Arguments> { private static final Type MAP_STRING_STRING_TYPE = new TypeToken<Map<String, String>>() {
From source file co.cask.cdap.internal.app.runtime.codec.ProgramOptionsCodec.java
/** * A Gson codec for {@link ProgramOptions}. */ public class ProgramOptionsCodec implements JsonSerializer<ProgramOptions>, JsonDeserializer<ProgramOptions> { @Override
From source file co.cask.cdap.internal.filesystem.LocationCodec.java
/** * Codec for {@link Location}. We write {@link java.net.URI} for location. */ public final class LocationCodec implements JsonSerializer<Location>, JsonDeserializer<Location> { private final LocationFactory lf;
From source file co.cask.cdap.notifications.NotificationFeedInfoDeserializer.java
/** * For backwards compatibility, can deserialize either the old Id.NotificationFeed or NotificationFeedInfo jsons into * a NotificationFeedInfo. */ public class NotificationFeedInfoDeserializer implements JsonDeserializer<NotificationFeedInfo> {
From source file co.cask.cdap.proto.codec.AbstractSpecificationCodec.java
/** * Abstract base class to provides common methods for all Codec. * * @param <T> The specification type that this codec handle. */ public abstract class AbstractSpecificationCodec<T> implements JsonSerializer<T>, JsonDeserializer<T> {
From source file co.cask.cdap.proto.codec.AuditMessageTypeAdapter.java
/** * Code for {@link AuditMessage}. */ public class AuditMessageTypeAdapter implements JsonDeserializer<AuditMessage> { @Override public AuditMessage deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)