title: how to get decimal format value from json object
body: <p>Im trying to get value from JSONObject. Here is the value in JSONObject.</p>
  
  <pre><code>{name: "alice", amount: 2.3}
  // name (string), amount (decimal)
  </code></pre>
  
  <p>I was confused of how to get the decimal value from JSONObject. Here is my code. Is my code is correct? i was think that float and decimal is different. I tried to find it, but i did not find it.</p>
  
  <pre><code>JSONObject data = new JSONObject();
  float myFloatValue = BigDecimal.valueOf(data.getDouble("amount")).floatValue();
  </code></pre>
  
  <p>......</p>