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.paysafe.common.impl.AddressContainerAdapter.java

/**
 * AddressContainerAdapter class used to properly serialize addressDetails node.
 */
public class AddressContainerAdapter
        implements JsonSerializer<AddressContainer>, JsonDeserializer<AddressContainer> {

From source file com.paysafe.common.impl.IdAdapter.java

/**
 * Type adapter for converting an Id to its serialized form.
 */
public class IdAdapter implements JsonSerializer<Id<? extends BaseDomainObject>>,
        JsonDeserializer<Id<? extends BaseDomainObject>> {

From source file com.pc.dailymile.domain.converters.DateConverter.java

public class DateConverter implements JsonDeserializer<Date>, JsonSerializer<Date> {

    // 2010-12-25T12:15:00Z
    private DateTimeFormatter deserializeFormatter = ISODateTimeFormat.dateTimeNoMillis()
            .withZone(DateTimeZone.UTC);

From source file com.pc.dailymile.domain.converters.TypeConverter.java

public class TypeConverter implements JsonDeserializer<Type>, JsonSerializer<Type> {

    public Type deserialize(JsonElement json, java.lang.reflect.Type typeOfT, JsonDeserializationContext context)
            throws JsonParseException {

        return Type.fromApiValue(json.getAsString());

From source file com.pipit.agc.util.LocalDateTimeConverter.java

/**
 * GSON serialiser/deserialiser for converting Joda {@link LocalDateTime} objects.
 */
public class LocalDateTimeConverter implements JsonSerializer<LocalDateTime>, JsonDeserializer<LocalDateTime> {
    /** Format specifier */
    private static final String PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSS";

From source file com.pkuhelper.model.base.jsr310.ZonedDateTimeJsonConverter.java

/**
 * GSON serializer/deserializer for converting {@link ZonedDateTime} objects.
 */
public class ZonedDateTimeJsonConverter implements JsonSerializer<ZonedDateTime>, JsonDeserializer<ZonedDateTime> {

    /** Formatter. */

From source file com.pmeade.arya.gson.serialize.AryaSerializer.java

/**
 * AryaSerializer implements serialization for objects that derive from Object
 * (i.e.: all Java objects). It implements Gson's JsonSerializer so that Gson
 * will call it when attempting to serialize an object to JSON.
 * @author pmeade
 */

From source file com.poslovnik.gson.PayoutSerializer.java

/**
 *
 * @author mixa
 */
public class PayoutSerializer implements JsonSerializer<Payout> {
    @Override

From source file com.poslovnik.gson.VacationSerializer.java

/**
 *
 * @author mixa
 */
public class VacationSerializer implements JsonSerializer<Vacation> {
    @Override

From source file com.postmark.java.DateTimeTypeAdapter.java

/**
 * Postmark for Java
 * <p/>
 * This library can be used to leverage the postmarkapp.com functionality from a Java client
 * <p/>
 * http://github.com/jaredholdcroft/postmark-java