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.j2.cs.webservices.metrofax.server.json.JsonLongTypeAdapter.java

/**
 *
 * @author Andres.Gama
 */
public class JsonLongTypeAdapter extends TypeAdapter<Number> {

From source file com.javacreed.examples.gson.part1.BookTypeAdapter.java

public class BookTypeAdapter extends TypeAdapter<Book> {

    @Override
    public Book read(final JsonReader in) throws IOException {
        throw new UnsupportedOperationException("Coming soon");
    }

From source file com.javacreed.examples.gson.part2.AbstractTypeAdapter.java

public abstract class AbstractTypeAdapter<T> extends TypeAdapter<T> {

    private Gson gson;

    protected <E> void delegateWrite(final JsonWriter out, final E object) throws IOException {
        @SuppressWarnings("unchecked")

From source file com.javacreed.examples.gson.part2.LargeDataTypeAdapter.java

public class LargeDataTypeAdapter extends TypeAdapter<LargeData> {

    @Override
    public LargeData read(final JsonReader in) throws IOException {
        throw new UnsupportedOperationException("Coming soon");
    }

From source file com.javacreed.examples.gson.part3.AbstractTypeAdapter.java

public abstract class AbstractTypeAdapter<T> extends TypeAdapter<T> {

    private Gson gson;

    protected <E> void delegateWrite(final JsonWriter out, final E object) throws IOException {
        @SuppressWarnings("unchecked")

From source file com.javacreed.examples.gson.part3.BookTypeAdapter.java

public class BookTypeAdapter extends TypeAdapter<Book> {

    @Override
    public Book read(final JsonReader in) throws IOException {
        final Book book = new Book();

From source file com.javacreed.examples.gson.part3.LargeDataTypeAdapter.java

public class LargeDataTypeAdapter extends TypeAdapter<LargeData> {

    @Override
    public LargeData read(final JsonReader in) throws IOException {
        throw new UnsupportedOperationException("Coming soon");
    }

From source file com.javacreed.examples.gson.part4.AbstractTypeAdapter.java

public abstract class AbstractTypeAdapter<T> extends TypeAdapter<T> {

    private Gson gson;

    protected <E> void delegateWrite(final JsonWriter out, final E object) throws IOException {
        @SuppressWarnings("unchecked")

From source file com.javacreed.examples.gson.part4.BookTypeAdapter.java

public class BookTypeAdapter extends TypeAdapter<Book> {

    @Override
    public Book read(final JsonReader in) throws IOException {
        final Book book = new Book();

From source file com.jd.survey.web.settings.NowwebmanagerController.java

class HibernateProxyTypeAdapter extends TypeAdapter<HibernateProxy> {

    public static final TypeAdapterFactory FACTORY = new TypeAdapterFactory() {
        @Override
        @SuppressWarnings("unchecked")
        public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {