class MappingFastJsonMessageConverter
        extends AbstractMessageConverter {
    /**
     * with fastJson config
     */
    private FastJsonConfig config = new FastJsonConfig();

    /**
     * default support application/json
     */
    public MappingFastJsonMessageConverter() {
        super(MimeTypeUtils.APPLICATION_JSON);
    }

    /**
     * @return the fastJsonConfig.
     */
    public FastJsonConfig getFastJsonConfig() {
        return config;
    }

    /**
     * @param fastJsonConfig the fastJsonConfig to set.
     */
    public void setFastJsonConfig(FastJsonConfig fastJsonConfig) {
        this.config = fastJsonConfig;
    }

    @Override
    protected boolean supports(Class<?> clazz) {
        return true;
    }

    @Override
    protected Object convertFromInternal(Message<?> message, Class<?> targetClass, Object conversionHint) {<FILL_FUNCTION_BODY>}

    @Override
    protected Object convertToInternal(Object payload, MessageHeaders headers, Object conversionHint) {
        // encode payload to json string or byte[]
        Object obj = null;

        if (byte[].class == getSerializedPayloadClass()) {
            if (payload instanceof String && config.isJSONB()) {
                obj = JSONB.fromJSONString((String) payload);
            } else if (payload instanceof String && !config.isJSONB()) {
                obj = ((String) payload).getBytes(config.getCharset());
            } else if (config.isJSONB()) {
                obj = JSONB.toBytes(payload, config.getSymbolTable(), config.getWriterFilters(), config.getWriterFeatures());
            } else {
                obj = JSON.toJSONBytes(payload, config.getDateFormat(), config.getWriterFilters(), config.getWriterFeatures());
            }
        } else if (String.class == getSerializedPayloadClass()) {
            if (payload instanceof String && JSON.isValid((String) payload)) {
                obj = payload;
            } else {
                obj = JSON.toJSONString(payload, config.getDateFormat(), config.getWriterFilters(), config.getWriterFeatures());
            }
        }
        return obj;
    }

    static Type getResolvedType(Class<?> targetClass, @Nullable Object conversionHint) {
        if (conversionHint instanceof MethodParameter) {
            MethodParameter param = (MethodParameter) conversionHint;
            param = param.nestedIfOptional();
            if (Message.class.isAssignableFrom(param.getParameterType())) {
                param = param.nested();
            }
            Type genericParameterType = param.getNestedGenericParameterType();
            Class<?> contextClass = param.getContainingClass();
            return GenericTypeResolver.resolveType(genericParameterType, contextClass);
        }
        return targetClass;
    }
}

        // parse byte[] or String payload to Java Object
        Object obj = null;
        Type type = getResolvedType(targetClass, conversionHint);
        Object payload = message.getPayload();

        if (payload instanceof byte[] && config.isJSONB()) {
            obj = JSONB.parseObject((byte[]) payload, type, config.getSymbolTable(), config.getReaderFilters(), config.getReaderFeatures());
        } else if (payload instanceof byte[] && !config.isJSONB()) {
            obj = JSON.parseObject((byte[]) payload, type, config.getDateFormat(), config.getReaderFilters(), config.getReaderFeatures());
        } else if (payload instanceof String && JSON.isValid((String) payload)) {
            obj = JSON.parseObject((String) payload, type, config.getDateFormat(), config.getReaderFilters(), config.getReaderFeatures());
        }
        return obj;
    
<no_super_class>