public <K, V> JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, JsonCodec<V> valueType)
{
Preconditions.checkNotNull(keyType, "keyType is null");
Preconditions.checkNotNull(valueType, "valueType is null");
ParameterizedTypeImpl mapType = new ParameterizedTypeImpl(null, Map.class, keyType, valueType.getType());
return new JsonCodec<Map<K, V>>(createObjectMapper(), mapType);
}