Example usage for com.google.gson TypeAdapter subclass-usage

List of usage examples for com.google.gson TypeAdapter subclass-usage

Introduction

In this page you can find the example usage for com.google.gson TypeAdapter subclass-usage.

Usage

From source file org.iff.infra.util.jaxrs.gson.GsonHashCode.java

/**
 * Gson representation for {@link HashCode}.
 * @author Andres Rodriguez
 */
public final class GsonHashCode extends TypeAdapter<HashCode> {
    /** Constructor. */

From source file org.immutables.gson.adapter.ExpectedSubtypesAdapter.java

/**
 * Composite type adapter used for polymorphic serialization.
 * It just buffers input and try each of delegating type adapters until succeeded. While there may
 * be legit concern about performance, it is most flexible way to handle subtypes by structure and
 * not by discriminator fields of some sort.
 * If failed with all type adapters exception will be thrown, attaching suppressed exceptions for

From source file org.jackhuang.hellominecraft.launcher.core.auth.yggdrasil.UUIDTypeAdapter.java

public class UUIDTypeAdapter extends TypeAdapter<UUID> {

    @Override
    public void write(JsonWriter out, UUID value) throws IOException {
        out.value(fromUUID(value));
    }

From source file org.jackhuang.hmcl.core.auth.yggdrasil.UUIDTypeAdapter.java

public class UUIDTypeAdapter extends TypeAdapter<UUID> {

    @Override
    public void write(JsonWriter out, UUID value) throws IOException {
        out.value(fromUUID(value));
    }

From source file org.jclouds.json.internal.NullHackJsonLiteralAdapter.java

/**
 * writes or reads the literal json directly
 * 
 * @see <a href="http://code.google.com/p/google-gson/issues/detail?id=326" />
 */
@Singleton

From source file org.jclouds.oauth.v2.json.ClaimSetTypeAdapter.java

/**
 * JSON TypeAdapter for the ClaimSet type. Pull the claims maps to the root level and adds two properties for the
 * expiration time and issuing time.
 *
 * @author David Alves
 */

From source file org.jclouds.oauth.v2.json.HeaderTypeAdapter.java

/**
 * JSON TypeAdapter for the Header type. Simply transforms the field names.
 */
public class HeaderTypeAdapter extends TypeAdapter<Header> {

    @Override

From source file org.jspare.core.serializer.converter.OptionalTypeAdapter.java

/**
 * The Class OptionalTypeAdapter.
 *
 * @author pflima
 * @param <E>
 *            the element type

From source file org.komodo.rest.json.LinkSerializer.java

/**
 * A GSON serializer/deserializer for {@link RestLink}s.
 */
public final class LinkSerializer extends TypeAdapter<RestLink> {

    private boolean isComplete(final RestLink link) {

From source file org.komodo.rest.json.RestPropertySerializer.java

/**
 *
 */
public class RestPropertySerializer extends TypeAdapter<RestProperty> implements JsonConstants {

    protected boolean isComplete(final RestProperty property) {