title: Why does Gson parse an Integer as a Double?
body: <p>A complex json string and I want to convert it to map,
  I have a problem.</p>
  
  <p>Please look at this simple test:</p>
  
  <pre><code>public class Test {
  
      @SuppressWarnings("serial")
      public static void main(String[] args) {
          Map&lt;String, Object&gt; hashMap = new HashMap&lt;String, Object&gt;();
          hashMap.put("data", "{\"rowNum\":0,\"colNum\":2,\"text\":\"math\"}");
  
          Map&lt;String,Object&gt; dataMap = JsonUtil.getGson().fromJson(
                  hashMap.get("data").toString(),new TypeToken&lt;Map&lt;String,Object&gt;&gt;() {}.getType());
  
          System.out.println(dataMap.toString());
  
      }
  }
  </code></pre>
  
  <p>result:<br>
  console print : <code>{rowNum=0.0, colNum=2.0, text=math}</code><br>
  Int is converted to Double；<br>
  Why does gson change the type  and how can I fix it?</p>