gpt4 book ai didi

json - soapUI中JSON响应的xPath

转载 作者:行者123 更新时间:2023-12-03 17:12:42 24 4
gpt4 key购买 nike

任何人都可以帮助找到“ tenantId”的xpath,这在下面给出的JSON响应中

{
"statusCode": "200",
"errorParams": null,
"payLoad": {
"UGX:XCD": {
"id": 42802,
"fromCurrency": {
"tenantId": "2a610af6-2e42-4a78-8e04-98755e2c6113",
"code": "UGX",
"name": "Ugandan Shilling",
"isoCode": "UGX",
"active": true,
"enabled": true,
"flagModifiedName": false,
"erpId": null,
"createdOn": 1427155200000,
"fieldLibraryStatus": "DRAFT",
"userId": null
},
"toCurrency": {
"tenantId": "2a610af6-2e42-4a78-8e04-98755e2c6113",
"code": "XCD",
"name": "East Caribbean Dollar",
"isoCode": "XCD",
"active": true,
"enabled": true,
"flagModifiedName": true,
"erpId": null,
"createdOn": 1427155200000,
"fieldLibraryStatus": "DRAFT",
"userId": "c7f68b05-044d-44e1-8fc5-0f97a4ece91b"
},
"rate": 33,
"inverseRate": 0.0303,
"createdOn": 1434025926983,
"modifiedOn": 1434326400000,
"active": true,
"purpose": "cmd",
"enabled": true,
"tenantFlag": true,
"erpId": null
}


如何遍历直到'tenantId'?

提前致谢。

最佳答案

SoapUI在内部将几乎所有内容都转换为XML。您将必须使用ResponseAsXml属性。在GUI中,如果单击XML选项卡,则可以看到此表示形式。

类似于以下内容的东西应该起作用:

${test_step#ResponseAsXml#//*:fromCurrency/*:tenantId}
${test_step#ResponseAsXml#//*:toCurrency/*:tenantId}

关于json - soapUI中JSON响应的xPath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30848150/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com