Problem on transform json file

Hi, i have a problem in the file transform json, for azure webapp, because, the automate added "{\ and " \n
i want:
“ConnectionStrings”: {
“AppSql”: "Data Source=xxxxxx.yyyyyyy.zzzzzz
and the transform give:
“ConnectionStrings”: "{“AppSql”: "Data Source=xxxxxx.yyyyyyy.zzzzzz.

How to avoid that \

I followed thefollowing method:

Can you help please ?


Thanks for getting in touch! I tried your scenario locally and can confirm that we do re-format the JSON file by adding carriage return character.

Here are the steps I did
Deploy a package with json looks like this (no line break)
{“ConnectionStrings”: {“AppSql”: “Data Source=xxxxxx.yyyyyyy.zzzzzz”}}

And I’ve set up the variables as shown in the screenshots below

After the deployment, they both end up with the same json file with CRLF

To help me understand a bit better, could you clarify if the issue you’re hitting is about the reformatting? E.g. Does it cause the deployment to fail? Or you would like to compare them and the reformatting makes it hard to do so?

If that is not the case, would you be able to let me know how you setup the variable and what version of Octopus you are running?

These information would be great to continuing the investigation.

Looking forward to hear from you soon.


Hi Eddy,
The action of deployment is ok, but the transform is not good
I want a file as:

and I have the file with a lot of

I have declared the variables as:

and the process config, we have activated json configuration variables and the target files is the good file.
When we reading le log of deployment the informations are good:

Extracted 214 files


Performing JSON variable replacement on ‘D:\Octopus\Work\20180323072908-17\appsettings.json’


Setting ‘ConnectionStrings’ = ‘{“AppSql”: “Data;Initial Catalog=YYYYYYYYYY;User ID=ZZZZZZ;Password=0123456”,“Blob”: “DefaultEndpointsProtocol=https;AccountName=storageXXXXX;AccountKey=veryveryverybigkey;BlobEndpoint=;QueueEndpoint=;TableEndpoint=;FileEndpoint=;”,“Datawarehouse”: “Persist Security Info=False;User ID=XXXYYY;Password=YYYYYXXXXXX;Initial Catalog=YYYYYYYY;Data”,}’

Currently we use the version of octopus deployment 3.3.6 .


My apologies for the inconvenience caused by this problem. I managed to replicated this issue in version 3.3.6 locally.

There are two options I believe that might help

  • Use the colon syntax e.g. ConnectionStrings: AppSql as the variable in variable editor
  • Upgrade to the latest version of Octopus

You can find more information regarding this issue from here

Would you be able to try one of those options and let me know how you go?

Looking forward to hear from you soon.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.