如何在 Power Automate 中为 JSON 有效负载解析 "Invalid type. Expected Integer but got Number."?

How can I resolve "Invalid type. Expected Integer but got Number." for JSON payloads in Power Automate?

我在 Power Automate 流程中使用 Parse JSON 函数时在示例 JSON 负载中遇到错误:

{
    "message": "Invalid type. Expected Integer but got Number.",
    "lineNumber": 0,
    "linePosition": 0,
    "path": "issues[0].fields.customfield_18478",
    "value": 1,
    "schemaId": "#/properties/issues/items/properties/fields/properties/customfield_18478",
    "errorType": "type",
    "childErrors": []
}

以上是我在 JIRA 中为自定义字段获取的示例错误。知道如何解决吗?

看来您必须同时为 integernumber 定义架构。这应该可以解决问题。

"customfield_18478": {

"type": ["integer", "number"]

},

Reference