public byte[] toJSONBBytes(JSONWriter.Feature... features) {
        try (JSONWriter writer = JSONWriter.ofJSONB(features)) {
            writer.setRootObject(this);
            writer.write(this);
            return writer.getBytes();
        }
    }
Serialize to JSONB bytes

@param features features to be enabled in serialization
@return JSONB bytes
core/src/main/java/com/alibaba/fastjson2/JSONArray.java