static <T> T parseObject(URL url, Function<JSONObject, T> function, JSONReader.Feature... features) {
        if (url == null) {
            return null;
        }

        try (InputStream is = url.openStream()) {
            JSONObject object = parseObject(is, features);
            if (object == null) {
                return null;
            }
            return function.apply(object);
        } catch (IOException e) {
            throw new JSONException("JSON#parseObject cannot parse '" + url + "'", e);
        }
    }
Parses the json stream of the url as a {@link JSONObject} and call the function
to convert it to {@link T}. Returns {@code null} if received {@link URL} is {@code null}.

@param url the specified url to be parsed
@param function the specified converter
@param features the specified features is applied to parsing
@return {@link T} or {@code null}
@throws JSONException If an I/O error or parsing error occurs
@see URL#openStream()
@see JSON#parseObject(InputStream, JSONReader.Feature...)
@since 2.0.4
core/src/main/java/com/alibaba/fastjson2/JSON.java