I've a json string which must be converted as a Java map of Long and Object. When I tried with Jackson ObjectMapper it creates LinkedHashMap instances instead of Object
Json String
"2": {
"firstName": "test",
"lastName": "test",
"title": "test",
"gender": "test",
}
}
Map<Long, Person> personMap = objectMapper.readValue(value, new TypeReference<Map<Long, Object>>(){});
I'm expecting a map of long and Person object