Hi All,
Please I need a way to return an xml response to its equivalent json format in B1if 2.0.
I know this is possible in B1if 1.0 but I am finding it difficult to achieve the same in 2.0
I am making a get call to BusinessPartner B1SL adapter via HTTP. The response is in xml but I want it to return json. Please kindly assist.
All of the solutions I have seen so far have NOT been helpful for 2.0
Reponse in XML
<?xml version="1.0" encoding="UTF-8"?> <Customers> <Customer> <CardCode>TEST01</CardCode> <CardName>Multichoice</CardName> </Customer> <Customer> <CardCode>TEST01</CardCode> <CardName>Discovery</CardName> </Customer> </Customers>
Json Response needed:
{ "Customers": [ { "CardCode": "DST001", "CardName": "Multichoice DSTV" }, { "CardCode": "DIS001", "CardName": "Discovery Insurance" } ] }
Thanks