@SuppressWarnings("unchecked")
    public Map<String, Object> expectObjectValue() {
        try {
            return (Map<String, Object>) value;
        } catch (ClassCastException e) {
            throw new JmespathException("Expected a map literal, but found " + value.getClass());
        }
    }
Gets the value as an object.

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