Skip to content
Advertisement

Tag: rest-assured-jsonpath

response.jsonPath() has square brackets around the element, how do I retrieve the string value? Rest Assured

I have an HTTP response body that looks that this when I make a GET request: When I try to assert the results with “Rest Assured”, the name value is always wrapped in square brackets []. So the test fails with Expected “MyNameTest”, but was “[MyNameTest]” Can any one tell me how to resolve this? Answer You are accessing values

Advertisement