Using BizTalk 2013 R2 to transform an XML message element to a JSON array

Posted: September 25, 2015  |  Categories: BizTalk Uncategorized

I wanted to know whether the out of the box  JSON encoder pipeline component creates an JSON array  if there is only one repeating XML fragment. One of my colleagues found with BizTalk 2013 he had to add an array attribute to the XML to force the creation of a JSON array (

I created a test schema shown below and deployed it to my run time.


I created this message and consumed it with a receive location that was configured with  passthrureceive location.

<ns0:Repeater xmlns:ns0=”http://JSONTest.Repeater”>

The XML message was then processed on a send port with a pipeline that only contained the JSON encoder pipeline component. Voila! I got the correct output shown below;

“Repeater”: {
“Repeat”: [

Thanks Microsoft this has saved me a lot of extra work that i had to do in BizTalk 2013.


Back to Top