I'm trying to send the below payload (JSON) to a REST endpoint, but when I use conventional mapping in BizTalk to build the XML schema, and then use the JSON encoder in a custom pipeline to send it out, it doesn't include the required array in filters (its a REST call requirement that the filters record is arrayed, even if there's only 1 filter record within)
{
"busObId": "9343f8800bd7ce14f0bf0a402d9d38be1a25069644",
"filters": [
{
"fieldId": "937905400191ae67dd03ab4b79968fcbaa264b1a75",
"operator": "eq",
"value": "TIER1WEB02"
}
],
"includeAllFields": false,
"includeSchema": false
}
I've considered using message assignment to manually write an XML structure, but I can't figure out how to get the JSON encoder to array the filters element.
Can anyone please advise on how I can ensure that payload is not removing the [] around filters?
Make sure that your pipeline has a XML Assembler in the pipeline before the JSON Encoder.
From my blog BizTalk 2013 R2 known bugs, issues & quirks