Azure Logic应用程序解析来自HTTP调用的复杂JSON
我正在构建一个逻辑应用程序,并尝试进行一些错误处理。我正在http调用中执行一个操作,如果失败,我希望读取正文并输出错误消息。 http调用失败后将输出以下内容:Azure Logic应用程序解析来自HTTP调用的复杂JSON,json,azure-logic-apps,jsonparser,Json,Azure Logic Apps,Jsonparser,我正在构建一个逻辑应用程序,并尝试进行一些错误处理。我正在http调用中执行一个操作,如果失败,我希望读取正文并输出错误消息。 http调用失败后将输出以下内容: "error": { "code": "BadRequest", "message": "", "innerError": { "date": "da
"error": {
"code": "BadRequest",
"message": "",
"innerError": {
"date": "date",
"request-id": "id",
"client-request-id": "id"
}
}
我正在解析此JSON,但模式有问题,这是我最新的尝试,但对我来说失败了:
{
"properties": {
"error": {
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"type": "object"
},
"type": "object"
},
"type": "object"
}
如果有人也能解释一下逻辑,那也太好了也许你可以试试这个模式:
{
"properties": {
"error": {
"properties": {
"code": {
"type": "string"
},
"innerError": {
"properties": {
"client-request-id": {
"type": "string"
},
"date": {
"type": "string"
},
"request-id": {
"type": "string"
}
},
"type": "object"
},
"message": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}