【发布时间】:2020-02-10 21:38:38
【问题描述】:
{
"body": {
"format": "json",
"query": {
"attributes": [
{
"field": "name",
"order": "none",
"hidden": false,
"label": "Computer"
}
],
"types": [],
"detail": true,
"filter": {},
"size": 5,
"types_group": "test",
"context": "newtest"
},
"bookmark": {
"guid": null,
"processed_time": 1570570800000
}
},
"description": "test new",
"display_name": "test1",
"type": "profile",
"read": "all",
"write": "all"
}
如何遍历这个 JSON 对象并验证 RestAssured 框架中键的每个值。
我想为这个 JSON 中的每个键比较类似的东西:
AssertTrue(get("display_name").matches("test1"))
【问题讨论】:
标签: java json rest-assured