public boolean getBooleanValue(int index) {
        Object value = get(index);

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

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

        if (value instanceof Number) {
            return ((Number) value).intValue() == 1;
        }

        if (value instanceof String) {
            String str = (String) value;
            return "true".equalsIgnoreCase(str) || "1".equals(str);
        }

        throw new JSONException("Can not cast '" + value.getClass() + "' to boolean value");
    }
Returns a boolean value at the specified location in this {@link JSONArray}.

@param index index of the element to return
@return boolean
@throws JSONException Unsupported type conversion to boolean value
@throws IndexOutOfBoundsException if the index is out of range {@code (index < 0 || index >= size())}
core/src/main/java/com/alibaba/fastjson2/JSONArray.java