I have used a Java ArrayList. Shen I inserted one element in the list and I have converted the Validatable response to an array list when I used assert equals it is showing that both are different like one is [abcd] other is [[abcd]].
Validatable response = given().spec(request).filter(new ErrorLoggingFilter(errorPrintStream)).pathParams("","").when.post(endpoint).then()
The response is of the form ArrayList when I printed that it came of the form [[abcd]].
Yes, ["abcd"] and [["abcd"]] are completely different. Let us understand why. Let us consider an array ["abcd"]. As you can see, it contains only one element i.e. "abcd". So this is an array that contains a single string value. Now for [["abcd"]], the outer array contains another array inside of it and the inner array contains "abcd". Though their ultimate content seem to be same, they are absolutely different. One is a string array (an array that contains a string value) and the other is an array of string arrays.