I have a jsonString which is a list of key value pairs.
[
{"id": "123", "url": "ghi"} : 2,
{"id": "456", "url": "def"} : 3
]
How to convert to HashMap. Maps:
Key - {"id": "123", "url": "ghi"} value - 2 Key - {"id": "456", "url": "def"} value - 3
The key issue here is that the Key is a composite type and not a simple datatype
Map<ComplexDataClass,Integer> fileObjects = mapper.readValue(jsonString, new TypeReference<Map<ComplexDataClass,Integer>>(){});