Example usage for com.google.gson JsonDeserializer interface-usage

List of usage examples for com.google.gson JsonDeserializer interface-usage

Introduction

In this page you can find the example usage for com.google.gson JsonDeserializer interface-usage.

Usage

From source file com.ephemeraldreams.gallyshuttle.data.LocalTimeSerializer.java

/**
 * Class to serialize a {@link LocalTime} into JSON and deserialize JSON to {@link LocalTime}.
 */
class LocalTimeSerializer implements JsonSerializer<LocalTime>, JsonDeserializer<LocalTime> {

    private static final DateTimeFormatter FORMATTER = DateTimeFormat.forPattern("HH:mm");

From source file com.epishie.tabs.gson.ThingDeserializer.java

public class ThingDeserializer implements JsonDeserializer<Thing> {
    private static final String ID = "id";
    private static final String NAME = "name";
    private static final String KIND = "kind";
    private static final String DATA = "data";

From source file com.evilco.license.common.data.holder.LicenseHolderJsonAdapter.java

/**
 * Allows (de-)serialization of license holders.
 * @author         Johannes "Akkarin" Donath <johannesd@evil-co.com>
 * @copyright         Copyright (C) 2014 Evil-Co <http://www.evil-co.com>
 */
public class LicenseHolderJsonAdapter implements JsonDeserializer<ILicenseHolder>, JsonSerializer<ILicenseHolder> {

From source file com.expensify.testframework.utils.CommandDeserializer.java

public class CommandDeserializer implements JsonDeserializer<CommandBase> {
    private static final String DefaultCommandElementName = "__type";

    String commandElementName;
    Gson gson;
    Map<String, Class<? extends CommandBase>> commandRegistry;

From source file com.exsoloscript.challonge.gson.AttachmentAdapter.java

/**
 * Type adapter for the {@link Attachment} class.
 * The received json object is being unpacked.
 *
 * @author EXSolo
 * @version 20160825.1

From source file com.exsoloscript.challonge.gson.MatchAdapter.java

/**
 * Type adapter for the {@link Match} class.
 * The received json object is being unpacked.
 *
 * @author EXSolo
 * @version 20160825.1

From source file com.exsoloscript.challonge.gson.MatchListAdapter.java

public class MatchListAdapter implements GsonAdapter, JsonDeserializer<List<Match>> {

    private final Gson gson;

    MatchListAdapter() {
        this.gson = new GsonBuilder().registerTypeAdapter(Match.class, new MatchAdapter()).create();

From source file com.exsoloscript.challonge.gson.OffsetDateTimeAdapter.java

/**
 * Type adapter for the {@link OffsetDateTime} class.
 *
 * @author EXSolo
 * @version 20160819.1
 */

From source file com.exsoloscript.challonge.gson.ParticipantAdapter.java

/**
 * Type adapter for the {@link com.exsoloscript.challonge.model.Participant} class.
 * The received json object is being unpacked.
 *
 * @author EXSolo
 * @version 20160819.1

From source file com.exsoloscript.challonge.gson.ParticipantListAdapter.java

public class ParticipantListAdapter implements GsonAdapter, JsonDeserializer<List<Participant>> {

    private final Gson gson;

    ParticipantListAdapter() {
        this.gson = new GsonBuilder().registerTypeAdapter(Participant.class, new ParticipantAdapter()).create();