We have a DataWeave expression wherein the payload, for some of the fields, special unicode control characters are coming.
This is leading to a WeaveExecutionException with the following message:
Exception while executing:
"userComment": "CA*2249*0*1763335*54133300896010155^ Unexpected character '\u000a' at payload@[8:116] (line:column), expected '"'.
Below is the payload which we are getting. Here, in the field usercomment
, a \u000a
(new line character) is coming:
{
"dcsId":"11840000000000001",
"accessToken":"jaskjadkjsa",
"profile": {
"comments": {
"feedback": [{
"feedBackType":
"5",
"userComment": "CA*2249*0*1763335*54133300896010155
1" }
]
}
},
"platform": "iphone"
}
Below is the logged Exception which we are getting in the console:
com.mulesoft.weave.mule.exception.WeaveExecutionException: Exception
while executing:
"userComment": "CA*2249*0*1763335*54133300896010155
^
Unexpected character '\u000a' at payload@[8:116] (line:column), expected
'"'.
Below is the DataWeave script we are executing:
%dw 1.0
%output application/java
---
payload
Does DataWeave have no support for unicode control characters?