@SuppressWarnings("unchecked")
    public List<Object> expectArrayValue() {
        try {
            return (List<Object>) value;
        } catch (ClassCastException e) {
            throw new JmespathException("Expected an array literal, but found " + value.getClass());
        }
    }
Gets the value as an array.

@return Returns the array value.
@throws JmespathException if the value is not an array.
smithy-jmespath/src/main/java/software/amazon/smithy/jmespath/ast/LiteralExpression.java