Ive been meaning to blog this one for a while as I got bitten by this a while ago.

Simply put if you use the logic app compose shape with a json object with a property called Body they it will get changed to lower case where as other properties dont, but this only seems to apply in the output of the compose shape.

If you look at the below diagram you can see I create a simple compose shape creating a json message.

If I run the logic app and look at the output from the compose shape I get this below where you can see its lower case.

If I add a variable though and just display the output of the compose shape as a string variable you can see the Body property is upper case.

If your parsing a message in a logic app or processing it then usually the casing isnt a problem but if you are working with a downstream system that might care about the casing then just be aware what you see as the output of the compose shape in the run history might not be exactly the same as what is sent downstream.

I did a couple of tests of scenarios on this and it seems to only happen to a property called Body/BODY on the json object. Sub-objects and properties by other names or xml or plain text messages used in the compose shape dont seem to have this behaviour. Im assuming its something to do with how the json message must be created under the hood. See below xml example which is fine.

 

Buy Me A Coffee