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.softwaremagico.tm.json.InterfaceAdapter.java

public class InterfaceAdapter<T> implements JsonSerializer<T>, JsonDeserializer<T> {

    private static final String JSON_CLASSNAME = "classname";
    private static final String JSON_DATA = "data";

    @Override

From source file com.solidfire.jsvcgen.serialization.OptionalAdapter.java

/**
 * Handles serializing and deserializing Optional objects.
 */
public class OptionalAdapter
        implements JsonSerializer<Optional<?>>, JsonDeserializer<Optional<?>>, InstanceCreator<Optional<?>> {

From source file com.sonaive.v2ex.io.MemberSerializer.java

/**
 * Created by liutao on 12/14/14.
 */
public class MemberSerializer implements JsonSerializer<Member> {

    @Override

From source file com.sonaive.v2ex.io.NodeSerializer.java

/**
 * Created by liutao on 12/14/14.
 */
public class NodeSerializer implements JsonSerializer<Node> {
    @Override
    public JsonElement serialize(Node src, Type typeOfSrc, JsonSerializationContext context) {

From source file com.sphereon.sdk.template.processor.handler.JSON.java

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

    /**
     * Constructor for DateAdapter
     *

From source file com.splicemachine.derby.ddl.InterfaceSerializer.java

/**
 * Custom gson serializer for interface
 *
 * @author jyuan
 */
public class InterfaceSerializer<T> implements JsonSerializer<T>, JsonDeserializer<T> {

From source file com.srotya.tau.wraith.actions.ActionSerializer.java

/**
 * JSON serializer/deserializer for the Actions, naming convention can be
 * supplied via configurable conventions file.
 * 
 * @author ambud_sharma
 */

From source file com.srotya.tau.wraith.conditions.ConditionSerializer.java

/**
 * Gson Type adapter for {@link Condition} to serialize and deserialize
 * conditions.
 * 
 * @author ambud_sharma
 */

From source file com.stackmob.sdk.push.StackMobPushTokenSerializer.java

public class StackMobPushTokenSerializer implements JsonSerializer<StackMobPushToken> {
    public JsonElement serialize(StackMobPushToken token, Type typeOfSrc, JsonSerializationContext context) {
        JsonObject object = new JsonObject();
        object.add("type", new JsonPrimitive(token.getTokenType().toString()));
        object.add("token", new JsonPrimitive(token.getToken()));
        object.add("registered_milliseconds", new JsonPrimitive(token.getRegisteredMilliseconds()));

From source file com.strategicgains.restexpress.serialization.json.GsonSerializer.java

/**
 * @author toddf
 * @since Nov 13, 2009
 */
public interface GsonSerializer<T> extends JsonDeserializer<T>, JsonSerializer<T>, InstanceCreator<T> {
}