You should create specific Map type and provide it into deserialization process:
TypeFactory typeFactory = mapper.getTypeFactory();
MapType mapType = typeFactory.constructMapType(HashMap.class, String.class, Theme.class);
HashMap<String, Theme> map = mapper.readValue(json, mapType);
More Related Contents:
- How to deserialise a subclass in Firebase using getValue(Subclass.class)
- Is Jackson’s @JsonSubTypes still necessary for polymorphic deserialization?
- Can not deserialize instance of java.util.ArrayList out of VALUE_STRING
- Jackson ObjectMapper DeserializationConfig.Feature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT
- Converting JSON data to Java object
- Infinite Recursion with Jackson JSON and Hibernate JPA issue
- How to change a field name in JSON using Jackson
- Convert JSON String to Pretty Print JSON output using Jackson
- How to customise the Jackson JSON mapper implicitly used by Spring Boot?
- JsonManagedReference vs JsonBackReference
- Why when a constructor is annotated with @JsonCreator, its arguments must be annotated with @JsonProperty?
- Right way to write JSON deserializer in Spring or extend it
- How do I obtain the Jackson ObjectMapper in use by Spring 4.1?
- How to parse a JSON string into JsonNode in Jackson?
- Strange Jackson exception being thrown when serializing Hibernate object
- Jackson: What happens if a property is missing?
- Jackson: how to prevent field serialization [duplicate]
- Json and Java – Circular Reference
- Polymorphism in jackson annotations: @JsonTypeInfo usage
- How to set format of string for java.time.Instant using objectMapper?
- Enforce not-null field in JSON object
- Casting LinkedHashMap to Complex Object
- Exception in thread “main” java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
- How to compare JSON documents and return the differences with Jackson or Gson?
- Spring 3.0 making JSON response using jackson message converter
- JSON Jackson parse different keys into same field
- How to efficiently map a org.json.JSONObject to a POJO?
- Jackson date-format for OffsetDateTime in Spring Boot
- Jackson JSON Deserialization: array elements in each line
- Autowiring in JsonDeserializer: SpringBeanAutowiringSupport vs HandlerInstantiator