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

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

Introduction

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

Usage

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

public class ParticipantQueryListAdapter implements GsonAdapter, JsonSerializer<List<ParticipantQuery>> {

    @Override
    public JsonElement serialize(List<ParticipantQuery> participantQueryList, Type type,
            JsonSerializationContext jsonSerializationContext) {
        JsonObject base = new JsonObject();

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

public class TournamentQueryAdapter implements GsonAdapter, JsonSerializer<TournamentQuery> {

    private final Gson gson;

    TournamentQueryAdapter() {
        this.gson = new GsonBuilder().registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeAdapter())

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> {

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

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

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

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