default JsonArray asJsonArray() throws JsonMappingException {
        return asJsonArrayOptional()
                .orElseThrow(() -> new JsonMappingException(null, String.format("Expected JSON array, received %s", node())));

    }
If this is a JSON array, return an instance of JsonArray. Otherwise, throw a JsonMappingException.
server-common/src/main/java/org/apache/kafka/server/util/json/JsonValue.java