JSON文件
[ { customerId:1}, { customerId:2 }, { customerId:3>} ]
在 JAVA 中
Response resp = when().get("link");
我收到了 json 到 resp 文件。
现在从resp文件中-我正在尝试创建一个数组-使用以下代码将customerId的所有值都保存在该数组中
ArrayList list = resp
.then()
.contentType(ContentType.JSON)
.extract()
.path(".customerId");
但它不工作。
有人可以帮我吗。?