Xml to Json conversion issue in REST

 I had a requirement to convert XML to JSON format using rest receiver channel.

I wanted to remove the root JSON tag in the receiver channel.


My DT was

DT_Company

 Record

   Field

     field1

     field2

   Field3

   Field4

   Field5   


Refer note - 

2743939 - XML Payload to JSON Conversion in REST receiver adapter


I used setIgnoreElements and provided value Records to remove JSON tag in Module configuration

 and checked Strip out element in the receiver channel 













This works fine for single record.

Note ->

But in case of multiple records, this doesn't work.

I also haven't explored on this part yet, but seems that this can be sorted out using XML JSON Conversion Rules.

Helpful link - 

https://blogs.sap.com/2016/01/13/rest-adapter-in-sap-pipo-enhanced-xmljson-conversion/



AMOR FATI - LOVE OF FATE


Comments

Popular posts from this blog

HTTP Retry - Groovy + Looping Process Call

Content Modifier - Concatenate Array Inputs ( Dynamic Parent Node)

Headers and Exchange Properties