code: void checkedPut(Object value) throws JSONException {
          if (value instanceof Number) {
              JSON.checkDouble(((Number) value).doubleValue());
          }
  
          put(value);
      }
docs: Same as {@link #put}, with added validity checks.