BLOG ARTICLE 2020/03 | 46 ARTICLE FOUND

  1. 2020.03.02 JSONObject get Float

JSONObject myObject = new JSONObject("{ \"anyString\":\"Hello World\", \"aNumber\": 123, \"aDouble\": 12345678987.00 }");

float myFloatValue = BigDecimal.valueOf(myObject.getDouble("aDouble")).floatValue();

AND