List of usage examples for com.google.gson TypeAdapterFactory interface-usage
From source file org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory.java
/**
* Creates type adapters for types handled in the following ways:
* <p/>
* <ul>
* <li>Deserialization</li>
* If there's an annotation designating a parameterized constructor, invoke that for fields correlating to named
From source file org.jclouds.json.internal.IgnoreNullFluentIterableTypeAdapterFactory.java
/**
* Eliminates null values when deserializing FluentIterables
* <p/>
* Treats [null] as the empty set; [A, null] as [A]; etc.
*
* @author Adam Lowe
From source file org.jclouds.json.internal.IgnoreNullIterableTypeAdapterFactory.java
/**
* Eliminates null values when deserializing Iterables
* <p/>
* Treats [null] as the empty set; [A, null] as [A]; etc.
*
* @author Adam Lowe
From source file org.jclouds.json.internal.IgnoreNullMapTypeAdapterFactory.java
/**
* Eliminates null values when deserializing Maps
* <p/>
* Treats {"a":null} as the empty map; {"a":1, "b":null} as {"a":1}; etc.
*
* @author Adam Lowe
From source file org.jclouds.json.internal.IgnoreNullMultimapTypeAdapterFactory.java
/** * Parses Multimaps to/from json - strips out any null values when deserializing * * @author Adam Lowe */ public class IgnoreNullMultimapTypeAdapterFactory implements TypeAdapterFactory {
From source file org.jclouds.json.internal.IgnoreNullSetTypeAdapterFactory.java
/**
* Eliminates null values when deserializing Sets
* <p/>
* Treats [null] as the empty set; [A, null] as [A]; etc.
*
* @author Adam Lowe
From source file org.jclouds.json.internal.OptionalTypeAdapterFactory.java
/** * Writes and reads Optional values as JSON */ public class OptionalTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked")
From source file org.lanternpowered.server.script.json.CatalogTypeTypeAdapterFactory.java
public class CatalogTypeTypeAdapterFactory implements TypeAdapterFactory { @Nullable @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { final Class<? super T> raw = type.getRawType();
From source file org.lanternpowered.server.script.json.ObjectTypeAdapterFactory.java
public class ObjectTypeAdapterFactory<V, O extends ObjectType<V>> implements TypeAdapterFactory { private static final String TYPE = "type"; private static final String DATA = "data"; private final AbstractObjectTypeRegistryModule registry;
From source file org.mule.runtime.extension.internal.persistence.DefaultImplementationTypeAdapterFactory.java
/**
* {@link TypeAdapterFactory} implementation, which creates {@link TypeAdapter}s that for any subclass of {@link S},
* fixes the serialization and desearilization to unique class {@link T}.
* <p>
* Does not matter which subclass of {@link S} is found, this factory will create {@link TypeAdapter}s of
* {@link T} type.