public static Map<String, Object> toMap(final Object object) {
        try {
            String json = MAPPER.writeValueAsString(object);
            final MapType mapType = MAPPER.getTypeFactory().constructMapType(LinkedHashMap.class, String.class, Object.class);
            return MAPPER.readValue(json, mapType);
        } catch (IOException e) {
            LOG.warn("write to map error: {}", object, e);
            return new LinkedHashMap<>();
        }
    }
Object to Map.

@param object the object
@return the converted map
shenyu-common/src/main/java/org/apache/shenyu/common/utils/JsonUtils.java