At the beginning of this week, I asked on Twitter which topic I should cover next. The options were BizTalk Server and JSON support or Azure Logic Apps. As a result, most replies clearly pointed to BizTalk Server and to better JSON support.
Therefore, I decided to respect my readers’ choice. Today, I am releasing a new addition to my BizTalk Pipeline Components Extensions Utility Pack community project for BizTalk Server 2016: the Custom JSON Encoder Pipeline Component.
At this point, you might be wondering why another JSON Encoder is needed. After all, BizTalk Server 2016 already includes one by default.
Indeed, Microsoft provides an out‑of‑the‑box JSON Encoder that converts XML messages into JSON and sends them to downstream systems. However, in real‑world scenarios, this component does not always behave as expected. In some cases, it fails during execution. In my case, it resulted in the following error:
Reason: Value cannot be null.
Parameter name: key
And in reality, what I just want is a simple way that, I hope, would work for all scenarios (aka XML messages) in a simple and effective way.
📝 One-Minute Brief
Introduces a custom JSON Encoder pipeline component for BizTalk Server, designed to reliably transform XML messages into JSON by extending the default encoder and allowing full control over the encoding behavior.
JSON Encoder Pipeline Component
The Custom JSON Encoder is a pipeline component for BizTalk Server that can be used in a Send Pipeline (Encode stage) to encode any XML message into a JSON equivalent in a simple and effective way.

Because I would like to have a choice between using the default pipeline component provide by Microsoft, at least the internal behavior, this pipeline component is an extension of the default JSON Encoder pipeline component and fully compatible with it and you will be able from the BizTalk Administration console you will be able to decide if:
- You want to use the behavior of the default JSON Encoder pipeline component provided by
Microsoft by setting the UseCustomEncoder property to False;

- Or use the custom behavior to generate the JSON message by setting the UseCustomEncoder property to True;
What is BizTalk Pipeline Components Extensions Utility Pack?
BizTalk Pipeline Components Extensions Utility Pack is a set of custom pipeline components (libraries) that can be used in received and sent pipelines, extending BizTalk’s out-of-the-box pipeline capabilities.
The project is available on the BizTalk Server Open Source Community repository on GitHub (https://github.com/BizTalkCommunity), and everyone can contribute new pipeline components to extend or improve existing BizTalk Server capabilities.
At the moment, it is only available for BizTalk Server 2016, but it will soon be compiled and available for previous versions of the product.
Download
You can download BizTalk Pipeline Components Extensions Utility Pack from GitHub:
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.

What about BizTalk 2013?