Skip to Content
Jul 02, 2019 at 08:37 PM

Formatting JSON in File to REST scenario


Hello Experts,

Currently I'm working on a Sender File to REST Receiver scenario, where I read a text file to do the content conversion and then convert the XML message to JSON to be sent in a POST method.

From the receiver side it is expected to receive a payload body like this:

After the conversion and mapping I'm getting this JSON:

As you can see the JSON top level is not built with square brackets and the array has to begin with a name, I can't leave it empty, this leads me to get an error from the API side response cause it has a wrong format.

My Message type is defined as this:

The XML is always generated with an additional tag that has the name of the recordset structure defined in the FCC

I checked the following Receiver REST adapter options and added the XML/JSON conversion options, but I still didin't get the JSON as needed.

Is there any way to make the top level brackets to be of an array type and to remove the tag "Alarma" that is generated in the XML from the File Adapter recordset structure.

I appreciate your comments and help with this question and hope I make myself clear.


Danilo Amaya


expected-json.png (13.1 kB)
generated-json.png (16.5 kB)
mt-alarm.png (11.3 kB)
generated-xml.png (12.9 kB)