我有一个关于获取从 jmeter 中的第一个请求获得的部分 json 响应以形成新的 HTTP 请求的查询。
我想用双引号和冒号提取 1 个信息 json 块(原样)作为第二个 HTTP 请求的一部分。
{
"details": [
{
"outBound": [
{
"info": {
"date": "2016-08-11",
"class": "M",
"code": 70,
"pricing": [
{
"totalAmount": 68.8,
"totalTaxAmount": 30.8,
"baseFareAmount": 38.0
}
],
"totalAmount": 68.8,
"totalDuration": 160,
"referenceNumber": 1,
"type": "RP",
"id": 1
},
"segments": [
{
"date": "2016-08-11",
"className": "Standard (W)",
"code": 70,
"totalAmount": 68.8,
"totalDuration": 160,
"referenceNumber": 1,
"type": "RP",
"duration": 160,
"number": "100"
}
]
},
{
"info": {
"date": "2016-08-11",
"class": "M",
"code": 70,
"pricing": [
{
"totalAmount": 78.8,
"totalTaxAmount": 40.8,
"baseFareAmount": 38.0
}
],
"totalAmount": 78.8,
"totalDuration": 160,
"referenceNumber": 2,
"type": "RP",
"id": 2
},
"segments": [
{
"date": "2016-08-11",
"className": "Standard (W)",
"code": 70,
"totalAmount": 78.8,
"totalDuration": 160,
"referenceNumber": 2,
"type": "RP",
"duration": 160,
"number": "200"
},
{
"date": "2016-08-11",
"className": "Standard (W)",
"code": 70,
"totalAmount": 78.8,
"totalDuration": 160,
"referenceNumber": 2,
"type": "RP",
"duration": 160,
"number": "100"
}
]
}
],
"resultCount": {
"count1": 1,
"count2": 1
},
"displayCount": 2
}
]
}
>Expected Output:
{
"info": {
"date": "2016-08-11",
"class": "M",
"code": 70,
"pricing": [
{
"totalAmount": 68.8,
"totalTaxAmount": 30.8,
"baseFareAmount": 38.0
}
],
"totalAmount": 68.8,
"totalDuration": 160,
"referenceNumber": 1,
"type": "RP",
"id": 1
},
"segments": [
{
"date": "2016-08-11",
"className": "Standard (W)",
"code": 70,
"totalAmount": 68.8,
"totalDuration": 160,
"referenceNumber": 1,
"type": "RP",
"duration": 160,
"number": "100",
}
]
}
=
我尝试使用 JSON PATH POST 处理器,但我以不带双引号的冒号和字符串数据 的形式获取提取的数据。