I have a Mule 3 dw 1.0 application with a payload that is HTML which is produced by a parse template component (the mime type this produces is application/json). I want to use this unescaped HTML as a string value in a transform message component so I have something like:
%dw 1.0
%output application/json
---
{
"body": payload
}
however, I get an exception at this stage due to < character not being valid. I have tried converting the payload to a string, converting the payload to a string prior to this transform message, converting the JSON to an object then to a string. None of which worked.