Example usage for com.google.gson TypeAdapter subclass-usage

List of usage examples for com.google.gson TypeAdapter subclass-usage

Introduction

In this page you can find the example usage for com.google.gson TypeAdapter subclass-usage.

Usage

From source file ToStringSerializedTypeAdapter.java

/**
 * Abstract type adapter for jsr310 date-time types.
 *
 * @author Christophe Bornet
 */
abstract class ToStringSerializedTypeAdapter<T> extends TypeAdapter<T> {

From source file LongDateTypeAdapter.java

/**
 * A Type adapter for {@link Date} that uses millisecond long values to write out date.
 * Remember to use an appropriate long serialization policy to avoid JSON parsers trimming
 * longs to a shorter value.
 *
 * @author Inderjeet Singh

From source file InstantTypeAdapter.java

/**
 * Type adapter for joda-time {@link Instant} class.
 *
 * @author Inderjeet Singh
 */
public class InstantTypeAdapter extends TypeAdapter<Instant> {

From source file DateTimeTypeAdapter.java

/**
 * Type adapter for joda-time {@link DateTime} class.
 *
 * @author Inderjeet Singh
 */
public class DateTimeTypeAdapter extends TypeAdapter<DateTime> {

From source file TemporalTypeAdapter.java

/**
 * Abstract type adapter for jsr310 date-time types.
 *
 * @author Christophe Bornet
 */
abstract class TemporalTypeAdapter<T> extends TypeAdapter<T> {

From source file abtlibrary.utils.as24ApiClient.JSON.java

/**
 * Gson TypeAdapter for Joda DateTime type
 */
class DateTimeTypeAdapter extends TypeAdapter<DateTime> {

    private final DateTimeFormatter formatter = ISODateTimeFormat.dateTime();

From source file at.orz.arangodb.entity.CollectionStatusTypeAdapter.java

/**
 * @author tamtam180 - kirscheless at gmail.com
 *
 */
public class CollectionStatusTypeAdapter extends TypeAdapter<CollectionStatus> {

From source file at.yawk.mojangapi.InstantTypeAdapter.java

/**
 * @author yawkat
 */
class InstantTypeAdapter extends TypeAdapter<Instant> {
    @Override
    public void write(JsonWriter out, Instant value) throws IOException {

From source file at.yawk.mojangapi.UUIDTypeAdapter.java

/**
 * @author yawkat
 */
class UUIDTypeAdapter extends TypeAdapter<UUID> {
    @Override
    public void write(JsonWriter out, UUID value) throws IOException {

From source file blog.ClassTypeAdapter.java

public class ClassTypeAdapter extends TypeAdapter<Class<?>> {
    @Override
    public void write(JsonWriter jsonWriter, Class<?> clazz) throws IOException {
        if (clazz == null) {
            jsonWriter.nullValue();
            return;