-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transforming directory pathh adds extra slashes "\\" #78
Comments
bump |
@sourcejon, @sunilbindra I wanted to have a look at this, but could not reproduce it. |
Found it. This happens, when using the DevOps Task and "correctly" escaping I.e. when the task is defined like: - task: MagicChunks@2
inputs:
sourcePath: 'test.json'
fileType: 'Auto'
targetPathType: 'source'
transformationType: 'json'
transformations: |
{
"ExternalFiles/EncryptionKeyFile":
"C:\\TotalKeys\\keytest.config.json"
} (notice the double However, if the transformation-json is defined ("wrongly") as - task: MagicChunks@2
inputs:
sourcePath: 'test.json'
fileType: 'Auto'
targetPathType: 'source'
transformationType: 'json'
transformations: |
{
"ExternalFiles/EncryptionKeyFile":
"C:\TotalKeys\keytest.config.json"
} (notice the single This behavior is the same, regardless whether one is using the "Inline JSON" transformation type or the "JSON File" type. |
When parsing the input for the DevOps task, every occurrence of "\" was replaced by "\\" - probably in the assumption that every JSON specified as transformation will always be incorrectly escaped.
I am suing Magic chunks. In my master json file I have one key with value
"ExternalFiles": {
"EncryptionKeyFile": "C:\TotalKeys\key.config.json"
}
In my transformation file transforming it to I have this
"ExternalFiles/EncryptionKeyFile": "C:\TotalKeys\keytest.config.json"
When it transform result is having some extra slashes, dont know why:-
"ExternalFiles": {
}
Any Idea why there are extra "\". it got 4 instead of 2.
Any one aware of any solution
Thanks
The text was updated successfully, but these errors were encountered: