title: Integer object in a <String, String> hashmap
body: <ol>
  <li>Create a (String, Object) hashMap and put values of different types.</li>
  <li>Serialize the hashmap into a json string and convert back into a hashmap of (String, String)</li>
  </ol>
  
  <p>When I try to get the value of key "key2", it will throw an exception saying "Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String".</p>
  
  <p>Is there a good way to explain this? Does it mean even though I have a (String, String) map, the value in it is not necessary String?</p>
  
  <p>Apologize for any confusion. Let me know if something is not clear.</p>
  
  <pre><code>Map&lt;String, Object&gt; map = new HashMap&lt;&gt;();
  map.put("key1", "value1");
  map.put("key2", 99);
  map.put("key3", new Date());
  
  
  JsonUtil jsonUtil = new JsonUtil();
  
  String s = jsonUtil.toJson(map);
  
  HashMap&lt;String, String&gt; newMap = jsonUtil.fromJson(s, HashMap.class);
  
  String value = newMap.get("key2");
  </code></pre>