Hi Team, I have defined a particular format to be inserted into my JSON column and it should be like this below, but some users send incorrect column names , how can I check this and raise an exception? So instead of first field fileDateStamp user sent Date, also some columns are not in right sequence.
Expected JSON:
"{ "fileDateStamp" : "2021-09-15 16:30:00",
"inventory" : [
{
"branch" : "SITE100",
"productIDQualifier" : "UPC",
"productID" : "78101150434",
"quantityOnHand" : 10,
"quantityUOM" : "EA",
"productURL" : "website url"
}
]
}"
Actual JSON from user:
{ "date": "2012-04-21T18:25:43.000Z",
"inventory": [
{
"branch": "1231",
"quantityOnHand": 300,
"quantityUOM": "CT",
"productID": "1009",
"productIDQualifier": "CATALOG",
"productURL": "www.testsite.com/productID/1009"
}
],
"DIST_ID": "123"
}
Edited by Moderator (BluShadow) to remove genuine website link