public boolean isWriteable(Class<?> type, //
                               Type genericType, //
                               Annotation[] annotations, //
                               MediaType mediaType) {
        if (!hasMatchingMediaType(mediaType)) {
            return false;
        }

        if (!isAssignableFrom(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.
src/main/java/com/alibaba/fastjson/support/jaxrs/FastJsonProvider.java