public static long toLongValue(Object value) {
        if (value == null) {
            return 0L;
        }

        if (value instanceof Long) {
            return (Long) value;
        }

        if (value instanceof Number) {
            return ((Number) value).longValue();
        }

        if (value instanceof String) {
            String str = (String) value;
            if (str.isEmpty() || "null".equals(str)) {
                return 0;
            }

            try {
                int lastCommaIndex = str.lastIndexOf(',');
                if (lastCommaIndex == str.length() - 4 && str.indexOf('.') == -1) {
                    return NumberFormat
                            .getNumberInstance()
                            .parse(str)
                            .longValue();
                }
            } catch (ParseException ignored) {
                // ignored
            }

            if (IOUtils.isNumber(str)) {
                return Long.parseLong(str);
            }

            throw new JSONException("parseLong error " + str);
        }

        throw new JSONException("can not cast to long from " + value.getClass());
    }
decimal is integer, check has non-zero small

@param decimal
@return
core/src/main/java/com/alibaba/fastjson2/util/TypeUtils.java