Search code examples
c#azurebiztalkbiztalk-2013biztalk-2016

BizTalk 2016 BRE


I am trying to replace some characters in a JSON file in BRE, I want to use this in BRE pipeline.

Below is the JSON input

{
    "Attributes": "{}",
    "Credentials": "[]",
    "AccessRules": "[]",
    "EmployeeNumber": "A",

}

I want to replace "{}" to {} and "[]" to [] using BRE Below is the final JSON what it needs to look like.

{
    "Attributes": {},
    "Credentials": [],
    "AccessRules": [],
    "EmployeeNumber": "A",

}

Note : For some Reason I am not able to create Empty JSON Object and Array through BizTalk JSON Encoder Pipeline.


Solution

  • Then you should have two actions in your BRE rule

    Replace the string "{}" in the message body with {}
    
    Replace the string "[]" in the message body with []