I am trying to validate response for the key A in below JSON response
This is the code I am using
given().
contentType("application/json; charset=utf-8").
body(requestFormat).
expect().statusCode(200).
when().
post(baseURl).
then().
log().body().
assertThat().body("T", equalTo(1)).
assertThat().body("A",equalTo("[]"));
My tests always fails but I can't see any difference in the log
java.lang.AssertionError: JSON path A doesn't match.
Expected: []
Actual: []
How do I check for empty array for a certain key ?