簡體   English   中英

解析 JSON 操作未從邏輯應用程序中的 JSON 返回字符串

[英]PARSE JSON action not returning string from JSON in Logic Apps

我將 JSON 下面發送到服務總線,然后在邏輯應用程序中使用 Parse JSON 進行解析。 但 InvoiceLineItems 以 null 的形式出現。 有什么想法嗎?

{
  "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"
    }
  }
}

你是如何解析輸入數據的? 我剛剛測試過,它工作正常。

架構:

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

Output: 在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM