private Object readType(Type type, HttpInputMessage inputMessage) {
        try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
            InputStream in = inputMessage.getBody();

            byte[] buf = new byte[1024 * 64];
            for (; ; ) {
                int len = in.read(buf);
                if (len == -1) {
                    break;
                }

                if (len > 0) {
                    baos.write(buf, 0, len);
                }
            }
            byte[] bytes = baos.toByteArray();

            JSONReader.Context context = JSON.createReadContext(
                    JSONFactory.getDefaultObjectReaderProvider(),
                    DEFAULT_PARSER_FEATURE,
                    fastJsonConfig.getFeatures()
            );

            String dateFormat = fastJsonConfig.getDateFormat();
            if (dateFormat != null) {
                context.setDateFormat(dateFormat);
            }

            return JSON.parseObject(bytes, type, context);
        } catch (JSONException ex) {
            throw new HttpMessageNotReadableException("JSON parse error: " + ex.getMessage(), ex);
        } catch (IOException ex) {
            throw new HttpMessageNotReadableException("I/O error while reading input message", ex);
        }
    }
@param fastJsonConfig the fastJsonConfig to set.
fastjson1-compatible/src/main/java/com/alibaba/fastjson/support/spring/FastJsonHttpMessageConverter.java