code: public static double requiredDouble(JSONObject o, String id) throws JSONConverterException {
          checkKeys(o, id);
          Object x = o.get(id);
          if (!(x instanceof Number)) {
              throw new JSONConverterException("Number expected at key '" + id + "' but was '" + x.getClass() + "'.");
          }
          return ((Number) x).doubleValue();
      }
docs: Read an expected double.
  
  @param o  the object to parse
  @param id the key in the map that points to the double
  @return the double
  @throws JSONConverterException if the key does not point to a double