class Fastjson2RenderFactory extends Fastjson2RenderFactoryBase {

    private ObjectWriterProvider config;
    private Set<JSONWriter.Feature> features;

    public Fastjson2RenderFactory() {
        features = new HashSet<>();
        features.add(JSONWriter.Feature.BrowserCompatible);
    }

    @Override
    public Render create() {
        return new StringSerializerRender(false, new Fastjson2Serializer(config, features.toArray(new JSONWriter.Feature[features.size()])));
    }


    @Override
    public ObjectWriterProvider config() {<FILL_FUNCTION_BODY>}

    /**
     * 重新设置特性
     */
    public void setFeatures(JSONWriter.Feature... features) {
        this.features.clear();
        this.features.addAll(Arrays.asList(features));
    }

    /**
     * 添加特性
     * */
    public void addFeatures(JSONWriter.Feature... features) {
        this.features.addAll(Arrays.asList(features));
    }

    /**
     * 移除特性
     * */
    public void removeFeatures(JSONWriter.Feature... features) {
        this.features.removeAll(Arrays.asList(features));
    }
}

        if (config == null) {
            config = new ObjectWriterProvider();
        }

        return config;
    
<methods>public non-sealed void <init>() ,public void addConvertor(Class<T>, Converter<T,java.lang.Object>) ,public void addEncoder(Class<T>, ObjectWriter#RAW) ,public abstract com.alibaba.fastjson2.writer.ObjectWriterProvider config() <variables>