code: public BigDecimal getBigDecimal(String key) throws JSONException {
          Object object = this.get(key);
          BigDecimal ret = objectToBigDecimal(object, null);
          if (ret != null) {
              return ret;
          }
          throw new JSONException("JSONObject[" + quote(key)
                  + "] could not be converted to BigDecimal (" + object + ").");
      }
docs: Get the BigDecimal value associated with a key. If the value is float or
  double, the the {@link BigDecimal#BigDecimal(double)} constructor will
  be used. See notes on the constructor for conversion issues that may
  arise.
  
  @param key
  A key string.
  @return The numeric value.
  @throws JSONException
  if the key is not found or if the value
  cannot be converted to BigDecimal.