static byte[] toJSONBytes(Object object, Filter[] filters, JSONWriter.Feature... features) {
        final JSONWriter.Context context = new JSONWriter.Context(JSONFactory.defaultObjectWriterProvider, features);
        if (filters != null && filters.length != 0) {
            context.configFilter(filters);
        }

        try (JSONWriter writer = JSONWriter.ofUTF8(context)) {
            if (object == null) {
                writer.writeNull();
            } else {
                writer.rootObject = object;
                writer.path = JSONWriter.Path.ROOT;

                Class<?> valueClass = object.getClass();
                ObjectWriter<?> objectWriter = context.getObjectWriter(valueClass, valueClass);
                objectWriter.write(writer, object, null, null, 0);
            }
            return writer.getBytes();
        }
    }
Serializes the specified object to the json byte array

@param object the specified object will be serialized
@param filters the specified filters is applied to serialization
@param features the specified features is applied to serialization
@return {@code byte[]} that is not null
@throws JSONException If a serialization error occurs
core/src/main/java/com/alibaba/fastjson2/JSON.java