【问题标题】:PARSE JSON action not returning string from JSON in Logic Apps解析 JSON 操作未从逻辑应用中的 JSON 返回字符串
【发布时间】:2021-03-28 20:34:06
【问题描述】:

我将以下 JSON 发送到服务总线,然后在逻辑应用程序中使用 Parse JSON 进行解析。但是 InvoiceLineItems 将作为空值出现。有什么想法吗?

{
  "BaselineDate": "2021-02-18",
  "ContactName": null,
  "DueDate": "2021-02-18",
  "DocumentType": "DG",
  "InvoiceLineItems": "[{\"itemLineNumber\":\"001\",\"itemCode\":null,\"itemDetails\":\"Test normal payment for Invoice\",\"unitPrice\":\"10\",\"orderQuantity\":null,\"gstInclAmount\":\"10\",\"glAccount\":\"1120001100\",\"costCentre\":null,\"taxCode\":\"S5\",\"accountType\":\"D\",\"clearingDocument\":\"1600001193\",\"comment1\":null,\"comment2\":null,\"comment3\":null,\"clearingDate\":\"2021-02-18\"},{\"itemLineNumber\":\"002\",\"itemCode\":null,\"itemDetails\":null,\"unitPrice\":\"10\",\"orderQuantity\":null,\"gstInclAmount\":\"10\",\"glAccount\":\"4100006100\",\"costCentre\":\"8606\",\"taxCode\":\"S5\",\"accountType\":\"S\",\"clearingDocument\":null,\"comment1\":null,\"comment2\":null,\"comment3\":null,\"clearingDate\":null}]"
}

要解析的架构如下:

{
  "type": "object",
  "properties": {
    "BaselineDate": {
      "type": "string"
    },
    "ContactName": {},
    "DocumentType": {
      "type": "string"
    },
    "DueDate": {
      "type": "string"
    },
    "InvoiceLineItems": {
      "type": "string"
    }
  }
}

【问题讨论】:

  • 您能否提供更多详细信息,例如您如何处理逻辑应用中的 json 以及如何将其处理到服务总线的屏幕截图?

标签: json azure-logic-apps


【解决方案1】:

您如何解析输入数据?我刚刚测试过,效果很好。

架构:

{
    "properties": {
        "BaselineDate": {
            "type": "string"
        },
        "ContactName": {},
        "DocumentType": {
            "type": "string"
        },
        "DueDate": {
            "type": "string"
        },
        "InvoiceLineItems": {
            "type": "string"
        }
    },
    "type": "object"
}

输出:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-07-10
    • 2019-12-09
    • 1970-01-01
    • 2018-04-13
    • 1970-01-01
    • 1970-01-01
    • 2020-12-27
    • 2016-12-09
    相关资源
    最近更新 更多