如何匹配字段为 URL 的 json 个对象
How to match json objects having fields as URL
我有一个 GET 请求,它以以下格式返回响应:
"http://wso2.org/claims/role": [
Application/API_ADMIN_SSO",
],
"http://wso2.org/claims/applicationtier": "Unlimited",
"http://wso2.org/claims/keytype": "PRODUCTION",
"http://wso2.org/claims/version": "v1",
"iss": "wso2.org/products/am"
如何匹配这些字段,因为如果我这样做
And match response.http://wso2.org/claims/applicationtier == "PRODUCTION"
它抛出错误提示路径不存在。
* def response = { "http://wso2.org/claims/applicationtier": "PRODUCTION" }
* match response['http://wso2.org/claims/applicationtier'] == 'PRODUCTION'
我有一个 GET 请求,它以以下格式返回响应:
"http://wso2.org/claims/role": [
Application/API_ADMIN_SSO",
],
"http://wso2.org/claims/applicationtier": "Unlimited",
"http://wso2.org/claims/keytype": "PRODUCTION",
"http://wso2.org/claims/version": "v1",
"iss": "wso2.org/products/am"
如何匹配这些字段,因为如果我这样做
And match response.http://wso2.org/claims/applicationtier == "PRODUCTION"
它抛出错误提示路径不存在。
* def response = { "http://wso2.org/claims/applicationtier": "PRODUCTION" }
* match response['http://wso2.org/claims/applicationtier'] == 'PRODUCTION'