title: JSONObject removes decimal dot, if round number
body: <p>Using a rest service, we are transfering values using JSON.</p>
  
  <p>At some point, we need to decide, wheter the incoming value was a long or a double. While</p>
  
  <pre><code>Double d = 17.0;
  
  System.out.println("toString(): " + d.toString());
  </code></pre>
  
  <p>will result in</p>
  
  <pre><code>toString(): 17.0
  </code></pre>
  
  <p>the zero and the point gets removed, when wrapping the value inside a JSONObject:</p>
  
  <pre><code>JSONObject jo = new JSONObject();
  jo.put("myDouble", d);
  System.out.println(jo.toString());
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>{"myDouble":17}
  </code></pre>
  
  <p>The rest-Service has basically an EAV-Store, so it should not determine the type by the ValueNAME given. I testet 2 JSON-Implementations, both have the same behaviour. </p>
  
  <p>can i somehow achieve, that the decimal value is appended in the JSONObject, without having to create my own implementation for it?</p>