public Date getDate(String key) {
        Object value = super.get(key);

        if (value == null) {
            return null;
        }

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

        if (value instanceof String) {
            return DateUtils.parseDate((String) value);
        }

        if (value instanceof Number) {
            long millis = ((Number) value).longValue();
            return new Date(millis);
        }

        return TypeUtils.toDate(value);
    }
Returns the {@link Date} of the associated keys in this {@link JSONObject}.

@param key the key whose associated value is to be returned
@return {@link Date} or null
core/src/main/java/com/alibaba/fastjson2/JSONObject.java