> @@ -201,6 +206,18 @@ public String toString() {
> }
> }
>
> + public static class ImmutableMapDeserializer implements
> JsonDeserializer<ImmutableMap<?,?>> {
> + @Override
> + public ImmutableMap<?,?> deserialize(final JsonElement json, final
> Type type,
> + final JsonDeserializationContext context) throws
> JsonParseException
> + {
> + final Type type2 =
> + ParameterizedTypeImpl.make(Map.class, ((ParameterizedType)
> type).getActualTypeArguments(), null);
> + final Map<?,?> map = context.deserialize(json, type2);
> + return ImmutableMap.copyOf(map);
> we'll have a follow-up commit to remove the kind of copies in constructors
> that you're talking about..?
Yes!
I am still investigating maybe doing something similar to the MapTypeAdapter
(to remove that inefficiency), but not done yet.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/455/files#r15492841