Backslash from the json is getting removed after the file is processed by copy activity
I have json input file which contains the below object
INPUT
{
"Name": "xyz",
"DOB":"14/09/1995"
}
After i read the files and save using the copy activity backslash from the DOB is getting removed.
Actual OUTPUT getting from Copy activity
{
"Name": "xyz",
"DOB":"14/09/1995"
}
I need to preserve the backslash
Required Output needed after copy activity
{
"Name": "xyz",
"DOB":"14/09/1995"
}
2
Answers
{"Name": "xyz", "DOB":"14\/09\/1995" }
i think you should use two backslashes to see one in the output , because json avoids backslashes.
If you can not change the JSON input, you can use ADF expression for escaping the backslashes
you can use a Derived Column transformation.
Create new column with an expression that can escape the backslashes in the DOB column. You can use the replace function for this:
replace(DOB, "/", "\/")