簡體   English   中英

無法反序列化當前 json object 當我嘗試將以下 Json 數據讀取到對象時顯示消息

[英]cannot deserialize the current json object Message shows when I try to read the below Json data into Objects

嘗試將以下 JSON 內容反序列化為對象時遇到問題,尤其是eInv部分中的內容

{
    "requestType": "SaveDocuments",
    "status": "P",
    "version": "v0.1",
    "validationReport": null,
    "dataReport": [
        {
            "locationGstin": "DSAJJ0AAGCR31",
            "locationName": "ABC MARKET",
            "documentNumber": "2947",
            "documentDate": "23-10-2020",
            "billFromGstin": "DDLDF07AAGCL",
            "supplyType": "S",
            "documentType": "LST",
            "portCode": null,
            "custom1": null,
            "custom2": null,
            "custom3": null,
            "custom4": null,
            "custom5": null,
            "custom6": null,
            "custom7": null,
            "custom8": null,
            "custom9": null,
            "custom10": null,
            "eInv": {
                "ackNumber": "1721101",
                "ackDate": "01-02-2021 18:54:00",
                "irn": "2d9a39998157b984276e6f1d3b8f74597d7850f0b7ba88c251556e4436b2bb0e",
                "signedInvoice": "CJWeJKYynrWOw2k-GLO-vDipfOohtqW1xh5bg",
                "signedQRCode": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjQe5VoYONjADbEYzGABzAz8cCyLXDfNENkZ_TXHw",
                "qrCode": "iVBORw0KGgoAAAANSUhEUgAAAG0AAABtCAYAAACrXCIc",
                "qrCodeData": "{\"SellerGstin\":\"abc\",\"BuyerGstin\":\"def\",\"DocNo\":\"234\",\"DocTyp\":\"ghi\",\"DocDt\":\"23/10/2020\",\"TotInvVal\":4005.00,\"ItemCnt\":4,\"MainHsnCode\":\"abc\",\"Irn\":\"321absd432\",\"IrnDt\":\"2021-02-01 18:54:00\"}",
                "errors": null
            },
            "propertyErrors": null
        }
    ],
    "referenceId": "abcdesf="
}

為自己找到一個 JSON 感知編輯器,例如 Visual Studio Code,或 Google 的任何在線 JSON 查看器,並養成使用這些工具檢查 Z0ECD11C1D7A287401D148A23BBD7A2F8 的習慣。

例如, https://jsoneditoronline.org/#left=local.taxoru&right=local.hucize在您的 JSON 中出現此錯誤:

Parse error on line 3:
...", "qrCodeData": "{"SellerGstin":"abc","
-----------------------^

刪除"qrCodeData": "應該是有效的。

暫無
暫無

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

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