on ‎2023 Feb 09 9:59 PM
Hi experts,
I have an issue in CPI using the JSON to XML converter, I tried to use it and CPI response me the next message: com.sap.it.xmljson.JsonXmlException: Cannot transform JSON document to XML: JSON document does not start with '{'.
I have the following JSON body that I need to convert to XML

I know the problem is [ at the beginning of the body. My question is, how can I remove that symbol to be able to use the JSON to XML converter?
I appreciate your answers
greetings
Request clarification before answering.
Hello Sara,
this is a limitation from the Json to XML Converter as stated in the documentation.
You can simply add a content modifier as described their and process the message.
Here an example with a simulation. I also had to add a second "root" element as their is alos a limitation that the root Object can only have one member. So I added a second root (the name can be adjusted in the Converter).
Content Modifier:

JSON to XML Converter:

Simulation Body input:

Simulation Body Middle:

Simulation Body End:

I hope this helps you with your issue.
Best Regards
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.