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 com.turo.pushy.apns.DateAsTimeSinceEpochTypeAdapter.java

/**
 * Converts {@link java.util.Date} instances in JSON objects to or from timestamps since the epoch.
 *
 * @author <a href="https://github.com/jchambers">Jon Chambers</a>
 */
class DateAsTimeSinceEpochTypeAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> {

From source file com.turo.pushy.apns.util.DateAsTimeSinceEpochTypeAdapter.java

/**
 * Converts {@link java.util.Date} instances in JSON objects to or from timestamps since the epoch.
 *
 * @author <a href="https://github.com/jchambers">Jon Chambers</a>
 */
public class DateAsTimeSinceEpochTypeAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> {

From source file com.twitter.sdk.android.core.AuthTokenAdapter.java

/**
 * Provides custom serialization and deserialization for classes that hold any type of
 * {@link com.twitter.sdk.android.core.AuthToken}.
 */
public class AuthTokenAdapter implements JsonSerializer<AuthToken>, JsonDeserializer<AuthToken> {

From source file com.twitter.sdk.android.core.models.BindingValuesAdapter.java

public class BindingValuesAdapter implements JsonSerializer<BindingValues>, JsonDeserializer<BindingValues> {
    private static final String STRING_TYPE = "STRING";
    private static final String IMAGE_TYPE = "IMAGE";
    private static final String USER_TYPE = "USER";
    private static final String BOOLEAN_TYPE = "BOOLEAN";

From source file com.urswolfer.gerrit.client.rest.gson.DateSerializer.java

/**
 * @author Urs Wolfer
 */
public class DateSerializer extends DateFormatter implements JsonSerializer<Date> {
    @Override
    public JsonElement serialize(Date date, Type type, JsonSerializationContext jsonSerializationContext) {

From source file com.vaadin.addon.charts.model.gsonhelpers.AxisListSerializer.java

/**
 * A serializer for axis containers. Takes care of switching between single
 * items and arrays.
 */
public class AxisListSerializer implements JsonSerializer<AxisList> {

From source file com.vaadin.addon.charts.model.gsonhelpers.ChartEnumSerializer.java

/**
 * Serializer for enums
 */
public class ChartEnumSerializer implements JsonSerializer<ChartEnum> {

    @Override

From source file com.vaadin.addon.charts.model.gsonhelpers.ContainerDataSeriesSerializer.java

/**
 * Serializer for ContainerSeries
 */
public class ContainerDataSeriesSerializer implements JsonSerializer<ContainerDataSeries> {

    private enum Mode {

From source file com.vaadin.addon.charts.model.gsonhelpers.PaneListSerializer.java

/**
 * Serializer for Pane containers. Takes care of switching between single item
 * and array.
 */
public class PaneListSerializer implements JsonSerializer<PaneList> {

From source file com.vaadin.addon.charts.model.gsonhelpers.SolidColorSerializer.java

/**
 * Serializer for SolidColors
 */
public class SolidColorSerializer implements JsonSerializer<SolidColor> {
    @Override
    public JsonElement serialize(SolidColor src, Type typeOfSrc, JsonSerializationContext context) {