diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java index 5d37fd9f8..917a2d5a3 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java @@ -356,7 +356,7 @@ public class PersistentEntityJackson2Module extends SimpleModule { } else if (value instanceof Map) { Map source = (Map) value; - Map resources = CollectionFactory.createMap(value.getClass(), source.size()); + Map resources = CollectionFactory.createApproximateMap(value.getClass(), source.size()); for (Entry entry : source.entrySet()) { resources.put(entry.getKey(), toResource(entry.getValue()));