title: Why double is converted to int in JSON string
body: <p>I just coded to put an array of double values in the <code>JsonObject</code>. But, all my double values are converted to int values, when i print it. can someone help me understand what is happening behind? Please let me know the best way to put primitive arrays in <code>JsonObject</code></p>
  
  <pre><code>public class JsonPrimitiveArrays {        
      public static void main(String[] args) {
          JSONObject jsonObject = new JSONObject();
          double[] d = new double[]{1.0,2.0,3.0};
          jsonObject.put("doubles",d);
          System.out.println(jsonObject);            
      }        
  }
  </code></pre>
  
  <p>Output:</p>
  
  <blockquote>
    <p>{"doubles":[1,2,3]}</p>
  </blockquote>