I'm trying to load a value taken from a JSON file. The target object where -reloading the JSON file is:
HashMap<String,LinkedList<Investor>> investors_per_location=new HashMap<>();
What I'm doing is creating a couple of Types:
MapType mapType = null;
CollectionType mapTypeAux = null;
mapTypeAux = typeFactory.constructCollectionType(LinkedList.class,Investor.class);
mapType = typeFactory.constructMapType(HashMap.class, String.class,mapTypeAux.getClass());
investors_per_location=objectMapper.readValue(jsonData, mapType);
My best guess is that, this is not the way to include a linkedlist within a hashmap to load it back from a JSON file. Any clue? Thx in advance, David.