code: public JSONObject element( String key, double value ) {
        verifyIsNull();
        Double d = new Double( value );
        JSONUtils.testValidity( d );
        return element( key, d );
     }
docs: Put a key/double pair in the JSONObject.
  
  @param key A key string.
  @param value A double which is the value.
  @return this.
  @throws JSONException If the key is null or if the number is invalid.