【发布时间】:2020-03-22 07:30:28
【问题描述】:
下面的JSON作为回复-
{
"result": {
"status": "ERROR",
"error": {
"errorCode": "x500",
"errorType": "string500",
"errorMessage": "string700"
}
}
}
我能够成功提取以下变量-
<JSONPayload>
<Variable name="result">
<JSONPath>$.result</JSONPath>
</Variable>
<Variable name="status">
<JSONPath>$.result.status</JSONPath>
</Variable>
<Variable name="errorCode">
<JSONPath>$.result.error.errorCode</JSONPath>
</Variable>
<Variable name="errorType">
<JSONPath>$.result.error.errorType</JSONPath>
</Variable>
<Variable name="errorMessage">
<JSONPath>$.result.error.errorMessage</JSONPath>
</Variable>
</JSONPayload>
但是,当我尝试从JSON 对象中提取完整的error 对象时,它显示无法执行ExtractVariables
<Variable name="error">
<JSONPath>$.result.error</JSONPath>
</Variable>
【问题讨论】:
标签: apigee