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.exsoloscript.challonge.gson.TournamentAdapter.java

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

From source file com.fa.mastodon.json.SpannedTypeAdapter.java

public class SpannedTypeAdapter implements JsonDeserializer<Spanned> {
    @Override
    public Spanned deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
            throws JsonParseException {
        return HtmlUtils.fromHtml(Emojione.shortnameToUnicode(json.getAsString(), false));
    }

From source file com.fa.mastodon.json.StringWithEmojiTypeAdapter.java

/** This is a type-based workaround to allow for shortcode conversion when loading display names. */
public class StringWithEmojiTypeAdapter implements JsonDeserializer<StringWithEmoji> {
    @Override
    public StringWithEmoji deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
            throws JsonParseException {
        String value = json.getAsString();

From source file com.facebook.buck.intellij.plugin.ws.buckevents.BuckEventAdapter.java

public class BuckEventAdapter implements JsonDeserializer<BuckEventInterface> {
    static final ImmutableMap<String, Class<? extends BuckEventBase>> MAPPINGS = ImmutableMap
            .<String, Class<? extends BuckEventBase>>builder()
            .put(BuckEventBuildStart.EVENT_TYPE, BuckEventBuildStart.class)
            .put(BuckEventBuildParseStart.EVENT_TYPE, BuckEventBuildParseStart.class)
            .put(BuckEventBuildParseEnd.EVENT_TYPE, BuckEventBuildParseEnd.class)

From source file com.fantasy.draftmanager.entities.translators.LeagueTranslator.java

/**
 *
 * @author Mac
 */
public class LeagueTranslator implements JsonDeserializer<League>, JsonSerializer<League> {

From source file com.fatboyindustrial.gsonjavatime.InstantConverter.java

/**
 * GSON serialiser/deserialiser for converting {@link Instant} objects.
 */
public class InstantConverter extends FormatableConverter
        implements JsonSerializer<Instant>, JsonDeserializer<Instant> {

From source file com.fatboyindustrial.gsonjavatime.LocalDateConverter.java

/**
 * GSON serialiser/deserialiser for converting {@link LocalDate} objects.
 */
public class LocalDateConverter extends FormatableConverter
        implements JsonSerializer<LocalDate>, JsonDeserializer<LocalDate> {

From source file com.fatboyindustrial.gsonjavatime.LocalDateTimeConverter.java

/**
 * GSON serialiser/deserialiser for converting {@link LocalDateTime} objects.
 */
public class LocalDateTimeConverter extends FormatableConverter
        implements JsonSerializer<LocalDateTime>, JsonDeserializer<LocalDateTime> {

From source file com.fatboyindustrial.gsonjavatime.LocalTimeConverter.java

/**
 * GSON serialiser/deserialiser for converting {@link LocalTime} objects.
 */
public class LocalTimeConverter extends FormatableConverter
        implements JsonSerializer<LocalTime>, JsonDeserializer<LocalTime> {

From source file com.fatboyindustrial.gsonjavatime.OffsetDateTimeConverter.java

/**
 * GSON serialiser/deserialiser for converting {@link OffsetDateTime} objects.
 */
public class OffsetDateTimeConverter extends FormatableConverter
        implements JsonSerializer<OffsetDateTime>, JsonDeserializer<OffsetDateTime> {