@SuppressWarnings({ "rawtypes", "unchecked" })
    public static <T> T cast(Object obj, Type type, ObjectReaderProvider provider) {
        if (type instanceof Class) {
            return cast(obj, (Class<T>) type, provider);
        }

        if (obj instanceof Collection) {
            return (T) provider.getObjectReader(type)
                    .createInstance((Collection) obj);
        }

        if (obj instanceof Map) {
            return (T) provider.getObjectReader(type)
                    .createInstance((Map) obj, 0L);
        }

        return JSON.parseObject(
                JSON.toJSONString(obj),
                type
        );
    }
All the positive powers of 10 that can be
represented exactly in double/float.
core/src/main/java/com/alibaba/fastjson2/util/TypeUtils.java