How to clean up the converted Json string from non Json ansi characters in Ms Access VBA
Is it possible to Trim the first 4 characters & the second last from the Json string below, the idea here is to remain with pure json, so that if I fail to iterate it , then I can have it printed and posted to the table manually.(Characters not required are ] j and 4c)
Below is the Ms Access VBA code that takes it to text file , but not fully cleaned up.
Text file Export VBA
Below is the Ms Access VBA code that takes it to text file , but not fully cleaned up.
Text file Export VBA
n = FreeFile()
Open "C:\Users\chris.hankwembo\Desktop\Leader\test.txt" For Output As #n
Print #n, strData
Close #n
Json String ] j{
"PosVendor": "Nector Prime Accounting Solutions",
"PosSoftwareVersion": "2.0.0.1",
"PosModel": "Cap-2017",
"PosSerialNumber": "100100001829",
"IssueTime": "20200326115321",
"TransactionType": 0,
"PaymentMode": 0,
"SaleType": 0,
"LocalPurchaseOrder": "",
"Cashier": "Admin Manager",
"BuyerTPIN": "",
"BuyerName": "",
"BuyerTaxAccountName": "",
"BuyerAddress": "",
"BuyerTel": "",
"OriginalInvoiceCode": "",
"OriginalInvoiceNumber": "",
"Memo": "",
"Items": [
{
"ItemId": 1,
"Description": "Cleaning Materials",
"BarCode": 19,
"Quantity": 1,
"UnitPrice": 56,
"Discount": 0,
"TaxLabels": [
"A"
],
"TotalAmount": 64.96,
"IsTaxInclusive": true,
"RRP": 0
}
]
}4c
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.