Json To Azure App Settings Save

Quick'n'dirty console app to convert .net core appsettings.json file to Azure Web App portal configuration advanced edit format so it can be copy pasted

Project README

JSON to Azure Portal Web App Configuration

Quick'n'dirty console app to convert .net core appsettings.json file to Azure Web App portal configuration advanced edit format so it can be copy pasted.

Built with .net core 3.

No release just clone the repo, build and run (it works on my machine :grin:).

image

Turn this

{
    "Logging": {
        "LogLevel": {
            "Default": "Debug",
            "System": "Information",
            "Microsoft": "Information"
        }
    },
    "MyConfig": {
        "Args": [
            "first",
            true,
            false,
            {
                "objProp": "Quick and dirty!"
            },
            3.141
        ],
        "AnswerToLife": 42,
        "Directory": "c:\\temp",
        "Parent": {
            "Child": {
                "Bool1": true
            },
            "Bool2": false
        }
    }
}

Into this

[
  {
    "name": "Logging:LogLevel:Default",
    "value": "Debug",
    "slotSetting": false
  },
  {
    "name": "Logging:LogLevel:System",
    "value": "Information",
    "slotSetting": false
  },
  {
    "name": "Logging:LogLevel:Microsoft",
    "value": "Information",
    "slotSetting": false
  },
  {
    "name": "MyConfig:Args",
    "value": "[\"first\",true,false,{\"objProp\":\"Quick and dirty!\"},3.141]",
    "slotSetting": false
  },
  {
    "name": "MyConfig:AnswerToLife",
    "value": "42",
    "slotSetting": false
  },
  {
    "name": "MyConfig:Directory",
    "value": "c:\\temp",
    "slotSetting": false
  },
  {
    "name": "MyConfig:Parent:Child:Bool1",
    "value": "True",
    "slotSetting": false
  },
  {
    "name": "MyConfig:Parent:Bool2",
    "value": "False",
    "slotSetting": false
  }
]

So you can paste it into your Azure portal Web App configuration application settings using the Advanced Edit.

image

Yes, there are better ways to deploy your settings with a proper CI tool but sometimes you just need quick and dirty :wink:.

Open Source Agenda is not affiliated with "Json To Azure App Settings" Project. README Source: AquilaSands/json-to-azure-app-settings
Stars
28
Open Issues
0
Last Commit
3 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating