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.vaadin.addon.charts.model.style.ThemeGradientColorSerializer.java

/**
 * Themes use different type of gradient syntax than other API, override JSON
 * generation to make compatible with themes.
 */
public class ThemeGradientColorSerializer implements JsonSerializer<GradientColor> {
    @Override

From source file com.vericite.client.JSON.java

class DateAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> {
    private final ApiClient apiClient;

    /**
     * Constructor for DateAdapter
     *

From source file com.vmware.dcp.common.serialization.ByteArrayToBase64TypeAdapter.java

class ByteArrayToBase64TypeAdapter implements JsonSerializer<byte[]>, JsonDeserializer<byte[]> {
    private static final Decoder DECODER = Base64.getDecoder();

    private static final Encoder ENCODER = Base64.getEncoder();

    @Override

From source file com.vmware.xenon.common.serialization.ByteArrayToBase64TypeAdapter.java

class ByteArrayToBase64TypeAdapter implements JsonSerializer<byte[]>, JsonDeserializer<byte[]> {
    private static final Decoder DECODER = Base64.getDecoder();

    private static final Encoder ENCODER = Base64.getEncoder();

    @Override

From source file com.vmware.xenon.common.serialization.UtcDateTypeAdapter.java

public final class UtcDateTypeAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> {

    private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ISO_INSTANT.withZone(ZoneId.of("UTC"));

    public static final UtcDateTypeAdapter INSTANCE = new UtcDateTypeAdapter();

From source file com.wallellen.wechat.common.util.json.WxMenuGsonAdapter.java

/**
 * @author wallellen
 */
public class WxMenuGsonAdapter implements JsonSerializer<WxMenu>, JsonDeserializer<WxMenu> {

    public JsonElement serialize(WxMenu menu, Type typeOfSrc, JsonSerializationContext context) {

From source file com.wallellen.wechat.cp.util.json.WxCpDepartGsonAdapter.java

/**
 * @author wallellen
 */
public class WxCpDepartGsonAdapter implements JsonSerializer<WxCpDepart>, JsonDeserializer<WxCpDepart> {

    public JsonElement serialize(WxCpDepart group, Type typeOfSrc, JsonSerializationContext context) {

From source file com.wallellen.wechat.cp.util.json.WxCpMessageGsonAdapter.java

/**
 * @author wallellen
 */
public class WxCpMessageGsonAdapter implements JsonSerializer<WxCpMessage> {

    public JsonElement serialize(WxCpMessage message, Type typeOfSrc, JsonSerializationContext context) {

From source file com.wallellen.wechat.cp.util.json.WxCpTagGsonAdapter.java

/**
 * @author wallellen
 */
public class WxCpTagGsonAdapter implements JsonSerializer<WxCpTag>, JsonDeserializer<WxCpTag> {

    public JsonElement serialize(WxCpTag tag, Type typeOfSrc, JsonSerializationContext context) {

From source file com.wallellen.wechat.cp.util.json.WxCpUserGsonAdapter.java

/**
 * @author wallellen
 */
public class WxCpUserGsonAdapter implements JsonDeserializer<WxCpUser>, JsonSerializer<WxCpUser> {

    public WxCpUser deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)