JSON Array – BizTalk JSON Encoder

Posted: July 2, 2017  |  Categories: BizTalk Uncategorized
Tags: JSON Pipeline
JSON Array – Recap

I have shown previously that the JSON encoder pipeline component creates a JSON array  when there is only one repeating XML fragment if the you create the solution correctly.

Mario Garcia wrote and said

Can you send me the complete code?, because I try but it does not work

JSON Array – Example

An example solution can be downloaded from here. Just unzip the project and import the deployment MSI from the deployment folder. Remember to run it too because this will create all the folders under C:\Temp. Enable the send and receive ports and restart the BizTalkApplication host instance. Rename the file C:\Temp\Repeater\Repeater.xml.txt  to C:\Temp\Repeater\Repeater.xml. The resultant JSON file will be written to  C:\Temp\RepeaterJSON\ as

{
“Repeater”: {
“Repeat”: [
“Repeat_0”
]
}
}

Most importantly the XML must conform to a schema that BizTalk knows about. Use a custom send pipeline that contains a XML Assembler pipeline component before the JSON encoder pipeline component.

If you don’t have a matching schema deployed and just have the JSON encoder pipeline component in the pipeline you will not get an array.

In summary the JSON encoder pipeline component creates a JSON array  when there is only one repeating XML fragment if the you create the solution correctly.

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top