Example usage for com.google.gson JsonSerializer interface-usage

List of usage examples for com.google.gson JsonSerializer interface-usage

Introduction

In this page you can find the example usage for com.google.gson JsonSerializer interface-usage.

Usage

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.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.cdap.template.etl.common.StructuredRecordSerializer.java

/**
 * Serializes the fields of a StructuredRecord as a JsonObject.
 */
public class StructuredRecordSerializer implements JsonSerializer<StructuredRecord> {

    @Override

From source file co.cask.hydrator.plugin.common.StructuredRecordSerializer.java

/**
 * Serializes the fields of a StructuredRecord as a JsonObject.
 */
public class StructuredRecordSerializer implements JsonSerializer<StructuredRecord> {

    @Override

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");