public Instant getInstant(int index) {
        Object value = get(index);

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

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

        if (value instanceof Number) {
            long millis = ((Number) value).longValue();
            if (millis == 0) {
                return null;
            }
            return Instant.ofEpochMilli(millis);
        }

        return TypeUtils.toInstant(value);
    }
Returns the {@link Instant} at the specified location in this {@link JSONArray}.

@param index index of the element to return
@return {@link Instant} or null
@throws IndexOutOfBoundsException if the index is out of range {@code (index < 0 || index >= size())}
core/src/main/java/com/alibaba/fastjson2/JSONArray.java