List of usage examples for com.google.gson TypeAdapterFactory interface-usage
From source file com.wix.mediaplatform.gson.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
* <pre> {@code
* abstract class Shape {
From source file com.xpbytes.gson.hal.HalTypeAdapterFactory.java
/** * @author Derk-Jan Karrenbeld */ public class HalTypeAdapterFactory implements TypeAdapterFactory { @Override
From source file com.yahoo.bullet.parsing.FieldTypeAdapterFactory.java
/**
* Adapted from * Google GSON's RuntimeTypeAdapterFactory to support a field based adapter. Instead of adding a new
* field to the top level, this takes a list of values that the field can be in order to decide which TypeAdapter to
* use. The field itself is represented as a passed in Function that operates on a JsonElement and returns a String.
* You can compute your field based on the JsonElement and return a String value. Subtypes can then be registered
* with a list of String values that this extracted field is checked against.
From source file cz.boris.gson.typeadapter.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
*
* <pre>
From source file data.RuntimeTypeAdapterFactory.java
public final class RuntimeTypeAdapterFactory<T> implements TypeAdapterFactory { private final Class<?> baseType; private final String typeFieldName; private final Map<String, Class<?>> labelToSubtype = new LinkedHashMap<String, Class<?>>(); private final Map<Class<?>, String> subtypeToLabel = new LinkedHashMap<Class<?>, String>();
From source file data_storage.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
*
* <pre>
From source file de.bwravencl.controllerbuddy.json.ModeAwareTypeAdapterFactory.java
public class ModeAwareTypeAdapterFactory implements TypeAdapterFactory { private final ResourceBundle rb = new ResourceBundleUtil().getResourceBundle(STRING_RESOURCE_BUNDLE_BASENAME, Locale.getDefault()); @Override
From source file de.chefkoch.api.serialize.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
*
* <pre>
From source file de.lulebe.designer.external.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
* <pre> {@code
* abstract class Shape {
From source file de.symeda.sormas.app.rest.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
* <pre> {@code
* abstract class Shape {