Skip to Content
0

REST Adapter XML to JSON convertion

Oct 27, 2017 at 11:09 AM

21

avatar image
Former Member

Hi community,

ich have an issue with REST Receiver Adapter and XML to JSON conversion. I have the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_ExportQueues xmlns:ns1="XXX">
   <export>
      <entry>
         <type>Article</type>
         <identifier>000000000010101041</identifier>
      </entry>
   </export>
   <export>
      <entry>
         <type>Article</type>
         <identifier>000000000010083175</identifier>
      </entry>
   </export>
</ns1:MT_ExportQueues>

No i want convert this with REST Adapter to following JSON:

[{
			"entry": {
				"type": "Article",
				"identifier": "000000000010101041"
			}
		}, {
			"entry": {
				"type": "Article",
				"identifier": "000000000010083175"
			}
		}
]

Have you an idea how i can make this. Or what i have to change so it works.

At the moment i have following result:

{
	"export": [{
			"entry": {
				"type": "Article",
				"identifier": "000000000010101041"
			}
		}, {
			"entry": {
				"type": "Article",
				"identifier": "000000000010083175"
			}
		}
	]
}

Regards,

Marcus

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers