Skip to Content
0
Jul 27, 2016 at 10:15 AM

Convert XML string to JSON format

4011 Views

Hi,

I have a requirement where I have to convert a string in XML format into corresponding JSON format.

The existing serializer does not recognise the tags and treats the entire string as one long text.

I tried using the XML parser( SMUM_XML_PARSE) which would return an internal table with the tags and corresponding values. JSON string generated from it treats the tags and values as value fields.

I would like to know whether my approach is right here or whether I should go about it differently. Also, I would appreciate some guidance on converting a string in XML format into corresponding JSON format.

Regards,

Renjith