@SuppressWarnings("unchecked")
    public <T> T to(Type type, JSONReader.Feature... features) {
        long featuresValue = JSONFactory.defaultReaderFeatures;
        boolean fieldBased = false;
        for (JSONReader.Feature feature : features) {
            if (feature == JSONReader.Feature.FieldBased) {
                fieldBased = true;
            }
            featuresValue |= feature.mask;
        }

        if (type == String.class) {
            return (T) toString();
        }

        ObjectReaderProvider provider = JSONFactory.getDefaultObjectReaderProvider();
        ObjectReader<T> objectReader = provider.getObjectReader(type, fieldBased);
        return objectReader.createInstance(this, featuresValue);
    }
Convert this {@link JSONObject} to the specified Object

<pre>{@code
JSONObject obj = ...
Map<String, User> users = obj.to(new TypeReference<HashMap<String, User>>(){}.getType());
}</pre>

@param type specify the {@link Type} to be converted
@param features features to be enabled in parsing
@since 2.0.4
core/src/main/java/com/alibaba/fastjson2/JSONObject.java