code: public static int requiredInt(JSONObject o, String id) throws JSONConverterException {
          checkKeys(o, id);
          try {
              return (Integer) o.get(id);
          } catch (ClassCastException e) {
              throw new JSONConverterException("Unable to read a int from string '" + id + "'", e);
          }
      }
docs: Read an expected integer.
  
  @param o  the object to parse
  @param id the key in the map that points to an integer
  @return the int
  @throws JSONConverterException if the key does not point to a int