Skip to content

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

License

Notifications You must be signed in to change notification settings

AquilaSands/json-to-azure-app-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 😁).

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 😉.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages