List of usage examples for com.google.gson JsonDeserializer interface-usage
From source file com.kotcrab.vis.editor.serializer.json.AssetComponentSerializer.java
/** @author Kotcrab */ public class AssetComponentSerializer implements JsonSerializer<AssetReference>, JsonDeserializer<AssetReference> { @Override public JsonElement serialize(AssetReference asset, Type typeOfSrc, JsonSerializationContext context) { JsonElement jsonAsset = context.serialize(asset.asset, asset.asset.getClass()); GsonUtils.appendClassProperty(jsonAsset, asset.asset, context);
From source file com.kotcrab.vis.editor.serializer.json.ClassJsonSerializer.java
/** @author Kotcrab */ public class ClassJsonSerializer implements JsonSerializer<Class<?>>, JsonDeserializer<Class<?>> { private ObjectMap<Class<?>, String> classTagMap = new ObjectMap<>(); private ObjectMap<String, Class<?>> tagClassMap = new ObjectMap<>(); private ClassLoader classLoader;
From source file com.kotcrab.vis.editor.serializer.json.IntArrayJsonSerializer.java
/** @author Kotcrab */ public class IntArrayJsonSerializer implements JsonSerializer<IntArray>, JsonDeserializer<IntArray> { @Override public JsonElement serialize(IntArray intArray, Type typeOfSrc, JsonSerializationContext context) { JsonArray json = new JsonArray();
From source file com.kotcrab.vis.editor.serializer.json.IntMapJsonSerializer.java
/** @author Kotcrab */ public class IntMapJsonSerializer<T> implements JsonSerializer<IntMap<T>>, JsonDeserializer<IntMap<T>> { @Override public JsonElement serialize(IntMap<T> intMap, Type typeOfSrc, JsonSerializationContext context) { JsonArray jsonArray = new JsonArray(); for (IntMap.Entry<T> entry : intMap.entries()) {
From source file com.kotcrab.vis.editor.serializer.json.ObjectMapJsonSerializer.java
/** @author Kotcrab */ public class ObjectMapJsonSerializer<K, V> implements JsonSerializer<ObjectMap<K, V>>, JsonDeserializer<ObjectMap<K, V>> { private static final String PROPERTY_CLASS_KEY = "@class-key"; private static final String PROPERTY_CLASS_VALUE = "@class-value";
From source file com.kurento.kmf.content.jsonrpc.GsonUtils.java
class JsonRpcResponseDeserializer implements JsonDeserializer<JsonRpcResponse> { @Override public JsonRpcResponse deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
From source file com.kurento.kmf.jsonrpcconnector.JsonUtils.java
class JsonRpcResponseDeserializer implements JsonDeserializer<Response<?>> { @Override public Response<?> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
From source file com.kyloth.serleena.synchronization.kylothcloud.CheckpointEntityDeserializer.java
/**
* Deserializer custom per deserializzare una CheckpointEntity dal JSON passato
* da Kyloth in GSON.
*
* @author Tobia Tesan <tobia.tesan@gmail.com>
* @version 1.0.0
From source file com.kyloth.serleena.synchronization.kylothcloud.EmergencyDataDeserializer.java
/**
* Deserializer custom per deserializzare una EmergencyDataEntity dal JSON passato
* da Kyloth in GSON.
*
* @author Tobia Tesan <tobia.tesan@gmail.com>
* @version 1.0.0
From source file com.kyloth.serleena.synchronization.kylothcloud.ExperienceEntityDeserializer.java
/**
* Deserializer custom per deserializzare una ExperienceEntity dal JSON passato
* da Kyloth in GSON.
*
* @author Tobia Tesan <tobia.tesan@gmail.com>
* @version 1.0.0