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 com.google.gerrit.server.notedb.CommentTimestampAdapter.java

/**
 * Adapter that reads/writes {@link Timestamp}s as ISO 8601 instant in UTC.
 *
 * <p>This adapter reads and writes the ISO 8601 UTC instant format, {@code "2015-06-22T17:11:00Z"}.
 * This format is specially chosen because it is also readable by the default Gson type adapter,
 * despite the fact that the default adapter writes in a different format lacking timezones, {@code

From source file com.google.gitiles.blame.RegionAdapter.java

class RegionAdapter extends TypeAdapter<Region> {
    private final DateFormatter df;

    RegionAdapter(DateFormatter df) {
        this.df = checkNotNull(df, "DateFormatter");
    }

From source file com.google.maps.internal.AddressComponentTypeAdapter.java

/**
 * This class handles conversion from JSON to {@link AddressComponentType}s.
 *
 * <p>Please see
 * <A href="https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapter.html">
 * here for more detail</a>.

From source file com.google.maps.internal.AddressTypeAdapter.java

/**
 * This class handles conversion from JSON to {@link AddressType}s.
 *
 * <p>Please see
 * <A href="https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapter.html">
 * here for more detail</a>.

From source file com.google.maps.internal.DateTimeAdapter.java

/**
 * This class handles conversion from JSON to {@link DateTime}s.
 *
 * <p>Please see
 * {@url https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapter.html}
 * for more detail.

From source file com.google.maps.internal.DayOfWeekAdapter.java

/**
 * This class handles conversion from JSON to {@link DayOfWeek}.
 *
 * <p>Please see <a
 * href="https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapter.html">GSON
 * Type Adapter</a> for more detail.

From source file com.google.maps.internal.DayOfWeekAdaptor.java

/**
 * This class handles conversion from JSON to {@link DayOfWeek}.
 *
 * <p>Please see <a href="https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapter.html">GSON
 * Type Adapter</a> for more detail.
 */

From source file com.google.maps.internal.DistanceAdapter.java

/**
 * This class handles conversion from JSON to {@link Distance}.
 *
 * <p>Please see
 * {@url https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapter.html}
 * for more detail.

From source file com.google.maps.internal.DurationAdapter.java

/**
 * This class handles conversion from JSON to {@link Distance}.
 *
 * <p>Please see
 * {@url https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapter.html}
 * for more detail.

From source file com.google.maps.internal.FareAdapter.java

/**
 * This class handles conversion from JSON to {@link com.google.maps.model.Fare}.
 */
public class FareAdapter extends TypeAdapter<Fare> {

    /**