@Override
    public boolean isWriteable(
            Class<?> type,
            Type genericType,
            Annotation[] annotations,
            MediaType mediaType) {
        if (hasNotMatchingMediaType(mediaType)) {
            return false;
        }
        if (isNotAssignableFrom(type, DEFAULT_UNWRITABLES)) {
            return false;
        }
        return isValidType(type, annotations);
    }
Method that JAX-RS container calls to try to check whether given value
(of specified type) can be serialized by this provider.
extension-jaxrs/extension-jaxrs-jakarta/src/main/java/com/alibaba/fastjson2/support/jaxrs/jakarta/FastJson2Provider.java