title: How to prevent JSONObject from json.jar converts decimal numbers string into double
body: <p>Using <code>JSONObject</code> to read a json response from a server. The server returns some decimal number. Normal numbers are not a problem to but the problem occurs when there is decimal number of form <code>0.00068</code>. Numbers like <code>0.00068</code> are automatically stored into <code>Double</code> object and when an attempt is made to retrieve such number returns "computerized scientific notation" of the number , that is 6.8E4 even if the number accessed as double by <code>getDouble(index)</code> method or as String with <code>getString(index)</code> method.</p>
  
  <p>Have tried this way of converting double value to string but have have eliminated this tecinique as there is some positve rounding added when <code>Double</code> converted to <code>BigDecimal</code>. This can be eliminated by rounding set while scaling to <code>BigDecimal.ROUND_CEILING</code>. But I don't want any scaling and want with the original values as the actual value is a small decimal number and the server guarantees the number wont exceed 6 digit after the decimal point.</p>
  
  <pre><code>BigDecimal big = new BigDecimal(new Double(0.00680));
  
  System.out.println(big.toPlainString()); //0.006799999999999999621136392846665330580435693264007568359375
  
  System.out.println(big.setScale(15, BigDecimal.ROUND_DOWN)); //0.006799999999999
  </code></pre>
  
  <p>Can there be some way to get actual string value of Double that is a number 0.00680 without scaling, or can we prevent <code>JSONObject</code> interpreting numbers in to their respective numeric classes.</p>
  
  <p>Thanking in advance.</p>