简体   繁体   English

无法反序列化当前 json object 当我尝试将以下 Json 数据读取到对象时显示消息

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

Having trouble when trying to deserialize the following JSON content into objects, especially the content in eInv part尝试将以下 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="
}

Find yourself a JSON aware editor, such as Visual Studio Code, or Google for any online JSON viewer and get into the habit of using these tools to check your JSON.为自己找到一个 JSON 感知编辑器,例如 Visual Studio Code,或 Google 的任何在线 JSON 查看器,并养成使用这些工具检查 Z0ECD11C1D7A287401D148A23BBD7A2F8 的习惯。

for example, https://jsoneditoronline.org/#left=local.taxoru&right=local.hucize gives this error with your JSON:例如, https://jsoneditoronline.org/#left=local.taxoru&right=local.hucize在您的 JSON 中出现此错误:

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

remove the first " after "qrCodeData": and you should be valid.删除"qrCodeData": "应该是有效的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM