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 citysdk.tourism.client.parser.POIDeserializer.java

/**
 * Gson deserializer class for the message formats involved in the CitySDK
 * Tourism WP.
 * 
 * @author Pedro Cruz
 * 

From source file cl.niclabs.cb.common.MethodParser.java

class MethodParser implements JsonDeserializer<Method> {

    private final MethodFactory methodFactory;

    private MethodParser(MethodFactory methodFactory) {
        this.methodFactory = methodFactory;

From source file cl.niclabs.tscrypto.common.datatypes.BigIntegerBase64TypeAdapter.java

public class BigIntegerBase64TypeAdapter implements JsonSerializer<BigInteger>, JsonDeserializer<BigInteger> {

    @Override
    public JsonElement serialize(BigInteger src, Type typeOfSrc, JsonSerializationContext context) {
        return new JsonPrimitive(new String(Base64.encodeBase64(src.toByteArray())));
    }

From source file cl.niclabs.tscrypto.common.messages.TSMessageParser.java

public class TSMessageParser implements JsonDeserializer<TSMessage> {

    @Override
    public TSMessage deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
            throws JsonParseException {

From source file cloud.artik.client.JSON.java

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

    /**
     * Constructor for DateAdapter
     *

From source file cmput301.f13t01.elasticsearch.InterfaceAdapter.java

/**
 * This is an adapter to allow Gson to properly serialize and deserialize
 * interface objects so that they may retain knowledge of their type.
 * 
 * @author Maciek Makowski
 * 

From source file co.aurasphere.botmill.fb.internal.util.json.AttachmentDeserializer.java

/**
 * Custom deserializer for an {@link Attachment}. Instantiates the correct
 * payload according to the current object.
 * 
 * @author Donato Rimenti
 */

From source file co.aurasphere.botmill.fb.internal.util.json.ButtonDeserializer.java

/**
 * Custom deserializer for an {@link Button}. Instantiates the correct button
 * from interface.
 * 
 * @author Donato Rimenti
 * @since 1.1.0

From source file co.aurasphere.botmill.fb.internal.util.json.ButtonSerializer.java

/**
 * Custom serializer/deserializer for an {@link Button}. Instantiates the
 * correct button from interface.
 * 
 * @author Donato Rimenti
 * @since 1.1.0

From source file co.aurasphere.botmill.fb.internal.util.json.IncomingMessageDeserializer.java

/**
 * Custom deserializer for an {@link IncomingMessage}. Instantiates the correct
 * message from interface.
 * 
 * @author Donato Rimenti
 * @since 1.1.0