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.julauncher.adapter.ColorTypeAdapter.java

/**
 * This class will ensure that colors are serialized to a hex value for easy editing
 */
public final class ColorTypeAdapter extends TypeAdapter<Color> {
    @Override
    public void write(JsonWriter writer, Color c) throws IOException {

From source file com.julauncher.data.mojang.FileTypeAdapter.java

public class FileTypeAdapter extends TypeAdapter<File> {

    @Override
    public File read(JsonReader json) throws IOException {
        if (json.hasNext()) {
            String value = json.nextString();

From source file com.mallorcasoftware.debitoorapiclient.JSON.java

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

    private final DateTimeFormatter formatter = ISODateTimeFormat.dateTime();

From source file com.mallorcasoftware.openweatherclient.JSON.java

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

    private final DateTimeFormatter formatter = ISODateTimeFormat.dateTime();

From source file com.mallorcasoftware.radiococlient.JSON.java

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

    private final DateTimeFormatter formatter = ISODateTimeFormat.dateTime();

From source file com.mbed.lwm2m.json.NumberTypeAdapter.java

/**
 * @author nordav01
 */
class NumberTypeAdapter extends TypeAdapter<Number> {

    @Override

From source file com.mosis.Test.HibernateProxyTypeAdapter.java

/**
 *
 * @author mflores98
 */
public class HibernateProxyTypeAdapter extends TypeAdapter<HibernateProxy> {

From source file com.onfido.JSON.java

/**
 * Gson TypeAdapter for jsr310 OffsetDateTime type
 */
class OffsetDateTimeTypeAdapter extends TypeAdapter<OffsetDateTime> {

    private final DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;

From source file com.openalpr.api.invoker.JSON.java

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

    private final DateTimeFormatter formatter = ISODateTimeFormat.dateTime();

From source file com.opencnc.util.HibernateProxyTypeAdapter.java

/**
 *
 * @author root
 */
public class HibernateProxyTypeAdapter extends TypeAdapter<HibernateProxy> {