Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

JSON Parser Error

I have activemq as a source and json data is populating and want to ingest result in db but while using JSON parser SDC throws error "Unrecognized token 'LT00178': was expecting ('true', 'false' or 'null')".

{ "billNumber": "LT00178", "Id": "3449", "": { "address1": "bla bla", "address2": null, "createdAt": 1554290470700, "updatedAt": 1554290470700 }, "dineInInfo": null, "Items": [{ "categoryId": "155044", "categoryName": "Pizza", "discountExemptedStatus": false, "addons": [{ "categoryId": "117441", "categoryName": "Pizza Topping", "createdAt": 1554290470674, "updatedAt": 1554290470674 }, { "categoryId": "174530", "categoryName": "Pizza Add-On", "createdAt": 1554290470675, "updatedAt": 1554290470675 }], "itemOffers": [], "itemTaxes": [{ "taxAmount": 1.875, "taxId": "0",

    }, {
        "taxAmount": 1.0,
        "taxId": "0",

    }, {
        "taxAmount": 1.875,
        "taxId": "0",

    }],
    "createdAt": 1554290470673,
    "updatedAt": 1554290470673
}, {
    "categoryId": "174514",
    "categoryName": "Non Veg Pizza",
    "addons": [{
        "categoryId": "117441",
        "categoryName": "Pizza Topping",
        "createdAt": 1554290470681,
        "updatedAt": 1554290470681
    }, {
        "categoryId": "174530",
        "categoryName": "Pizza Add-On",
        "createdAt": 1554290470682,
        "updatedAt": 1554290470682
    }],
    "itemOffers": [],
    "itemTaxes": [{
        "taxAmount": 1.0,
        "taxId": "0",
    }, {
        "taxAmount": 4.8875,
        "taxId": "0",

    }, {
        "taxAmount": 4.8875,
        "taxId": "0",

    }],
    "createdAt": 1554290470680,
    "updatedAt": 1554290470680
}],
"Meta": {
    "customerJson": null,
    "offerJson": null,
    "paymentJson": null,
    "taxJson": null,
    "metaJson": "{\"shiftId\":null,\"instanceId\":null,\"appDataRev\":null,\"appVersion\":null,\"tokenNumber\":\"LT-1\",\"rev\":\"6-f4e2a43b2be6eeb514479583146639af\"}",
    "orderJson": null
},
"Payments": [{
    "amount": 286.0,
    "comment": null,
    "paymentId": null,
    "paymentInfo": null,
    "paymentMode": "Cash",
    "paymentModeId": 2,
    "paymentVendor": null,
    "paymentStatus": "SUCCESS",
    "paymentTime": 0,
    "createdAt": 1554290470687,
    "updatedAt": 1554290470687
}],
"taxes": [{
    "taxAmount": 2.0,
    "taxId": "0",
    "taxName": "Delivery Charge",

}, {
    "taxAmount": 6.76,
    "taxId": "0",
    "taxName": "CGST",

}, {
    "taxAmount": 6.76,
    "taxId": "0",
    "taxName": "SGST",

}],
"offers": [],
"States": [{
    "brandUserId": "25408831",
    "state": "CREATED",

}, {
    "brandUserId": "25408831",
    "state": "PAYMENT_INITIATED",

}, {
    "brandUserId": "25408831",
    "state": "PENDING",

}, {
    "brandUserId": "10854040",
    "state": "ACCEPTED",

}, {
    "brandUserId": "10854040",
    "state": "PREPARED",

}, {
    "brandUserId": "10854040",
    "state": "DISPATCHED",

}, {
    "brandUserId": "10854040",
    "state": "DELIVERED",

}],
"operationTime": 0

}

JSON Parser Error

I have activemq as a source and json data is populating and want to ingest result in db but while using JSON parser SDC throws error "Unrecognized token 'LT00178': was expecting ('true', 'false' or 'null')".

{
    "billNumber": "LT00178",
    "Id": "3449",
    "": {
        "address1": "bla bla",
        "address2": null,
        "createdAt": 1554290470700,
        "updatedAt": 1554290470700
    },
    "dineInInfo": null,
    "Items": [{
        "categoryId": "155044",
        "categoryName": "Pizza",
        "discountExemptedStatus": false,
        "addons": [{
            "categoryId": "117441",
            "categoryName": "Pizza Topping",
            "createdAt": 1554290470674,
            "updatedAt": 1554290470674
        }, {
            "categoryId": "174530",
            "categoryName": "Pizza Add-On",
            "createdAt": 1554290470675,
            "updatedAt": 1554290470675
        }],
        "itemOffers": [],
        "itemTaxes": [{
            "taxAmount": 1.875,
            "taxId": "0",

    }, {
"0",

        }, {
            "taxAmount": 1.0,
         "taxId": "0",

    }, {
    }, {
            "taxAmount": 1.875,
         "taxId": "0",

     }],
     "createdAt": 1554290470673,
     "updatedAt": 1554290470673
}, {
    }, {
        "categoryId": "174514",
     "categoryName": "Non Veg Pizza",
     "addons": [{
         "categoryId": "117441",
         "categoryName": "Pizza Topping",
         "createdAt": 1554290470681,
         "updatedAt": 1554290470681
    }, {
    }, {
            "categoryId": "174530",
         "categoryName": "Pizza Add-On",
         "createdAt": 1554290470682,
         "updatedAt": 1554290470682
     }],
     "itemOffers": [],
     "itemTaxes": [{
         "taxAmount": 1.0,
         "taxId": "0",
    }, {
    }, {
            "taxAmount": 4.8875,
         "taxId": "0",

    }, {
    }, {
            "taxAmount": 4.8875,
         "taxId": "0",

     }],
     "createdAt": 1554290470680,
     "updatedAt": 1554290470680
 }],
 "Meta": {
     "customerJson": null,
     "offerJson": null,
     "paymentJson": null,
     "taxJson": null,
     "metaJson": "{\"shiftId\":null,\"instanceId\":null,\"appDataRev\":null,\"appVersion\":null,\"tokenNumber\":\"LT-1\",\"rev\":\"6-f4e2a43b2be6eeb514479583146639af\"}",
     "orderJson": null
 },
 "Payments": [{
     "amount": 286.0,
     "comment": null,
     "paymentId": null,
     "paymentInfo": null,
     "paymentMode": "Cash",
     "paymentModeId": 2,
     "paymentVendor": null,
     "paymentStatus": "SUCCESS",
     "paymentTime": 0,
     "createdAt": 1554290470687,
     "updatedAt": 1554290470687
 }],
 "taxes": [{
     "taxAmount": 2.0,
     "taxId": "0",
     "taxName": "Delivery Charge",

}, {
    }, {
        "taxAmount": 6.76,
     "taxId": "0",
     "taxName": "CGST",

}, {
    }, {
        "taxAmount": 6.76,
     "taxId": "0",
     "taxName": "SGST",

 }],
 "offers": [],
 "States": [{
     "brandUserId": "25408831",
     "state": "CREATED",

}, {
    }, {
        "brandUserId": "25408831",
     "state": "PAYMENT_INITIATED",

}, {
    }, {
        "brandUserId": "25408831",
     "state": "PENDING",

}, {
    }, {
        "brandUserId": "10854040",
     "state": "ACCEPTED",

}, {
    }, {
        "brandUserId": "10854040",
     "state": "PREPARED",

}, {
    }, {
        "brandUserId": "10854040",
     "state": "DISPATCHED",

}, {
    }, {
        "brandUserId": "10854040",
     "state": "DELIVERED",

 }],
 "operationTime": 0
}

}