protected final <V> Map<String, V> deserializeMap(JsonElement json, JsonDeserializationContext context, Class<V> valueType) { Type type = new TypeToken<Map<String, V>>() { }.where(new TypeParameter<V>() { }, valueType).getType(); Map<String, V> map = context.deserialize(json, type); return map == null ? Collections.<String, V>emptyMap() : map; }
protected final <V> Map<String, V> deserializeMap(JsonElement json, JsonDeserializationContext context, Class<V> valueType) { Type type = new TypeToken<Map<String, V>>() { }.where(new TypeParameter<V>() { }, valueType).getType(); Map<String, V> map = context.deserialize(json, type); return map == null ? Collections.<String, V>emptyMap() : map; }