I know I have the option to make a POJO object to store this. However, I am trying to do it in a nested HashMap. Whenever I do the following I am getting Type Safety Warnings.
Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();
map.put("fund_cde", new HashMap(){{put("ABC", "ABC is not valid message.");}});
If I set the nested HashMaps type like so:
map.put("fund_cde", new HashMap<String, String>(){{put("ABC", "ABC is not valid message");}});
I end up with this warning instead:
The serializable class does not declare a static final serialVersionUID field of type long
Any advice on correct way to do this? I had a look at How to put/get values into/from Nested HashMap but I'm still not understanding it.
Thanks!