逻辑应用程序 - 不同的 JSON 模式在后续操作中提供不同的可能性

Logic Apps - Different JSON schemas giving different possibilities in subsequent actions

我正在逻辑应用程序中解析一些 JSON。为什么这两个 JSON 模式被区别对待。我如何修改第二个以匹配第一个? 有了这个 JSON,当我根据解析的 JSON.

创建新步骤时,我可以看到类似成功的变量
<code>
{
"properties": {
    "params": {
        "properties": {
            "WOPARTSOPT": {
                "type": "string"
            }
        },
        "required": [
            "WOPARTSOPT"
        ],
        "title": "The Params Schema",
        "type": "object"
    },
    "success": {
        "type": "string"
    }
},
"required": [
    "success",
    "params"
],
"title": "The Root Schema",
"type": "object"
}
</code>

With this JSON I can't see the variable like success when I create a new step based on the parsed 
JSON.

<code>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
    "Payload": {
        "items": [
            {
                "properties": {
                    "PR_ADD1": {
                        "type": "string"
                    }
                },
                "required": [
                    "PR_ADD1"
                ],
                "type": "object"
            }
        ],
        "type": "array"
    }
},
"required": [
    "Payload"
],
"type": "object"
}
</code>

据我了解,第二个 json 模式没有 "success" 的属性,因此不能用于解析具有 [=] 的 json 数据"success" 的 25=]。所以这就是为什么您在接下来的步骤中看不到变量 "success" 的原因。

顺便问一下,您为什么要修改第二个架构以匹配第一个架构?我们可以通过单击 "Use sample payload to generate schema" 按钮并在其中输入 json 字符串来生成 json 模式,它会自动生成模式。

如果我误解了你的问题,请告诉我。我会尽力提供解决方案~