您是否注意到Azure升级了AppSettings Management?现在可以使用高级编辑选项一次性更新多个 AppSettings,但格式与 AppSettings.json 不同。
![Azure Edit Options](https://i.stack.imgur.com/srzGG.png)
我正在寻找一种快速解决方案,将我的 AppSettings 部分转换为 Azure 高级编辑选项格式。你知道怎么做吗?
So this:
"Simulation": {
"ApiUrl": "YourApiUrl",
"ApiKey": "YouApiKey",
"Groups": [
{
"Name": "YourGroup",
"Latitude": 45.50884,
"Longitude": -73.58781,
"Radius": 500
}
],
"Planifications": [
{
"GroupName": "YourGroup",
"At": "07:00",
"Status": 10
}
]
}
将被格式化为:
[
{
"Name": "Simulation:ApiUrl",
"Value": "YourApiUrl",
"SlotSetting": false
},
{
"Name": "Simulation:ApiKey",
"Value": "YourApiKey",
"SlotSetting": false
},
{
"Name": "Simulation:Groups:0:Name",
"Value": "YourGroup",
"SlotSetting": false
},
{
"Name": "Simulation:Groups:0:Latitude",
"Value": "45.50884",
"SlotSetting": false
},
{
"Name": "Simulation:Groups:0:Longitude",
"Value": "-73.58781",
"SlotSetting": false
},
{
"Name": "Simulation:Groups:0:Radius",
"Value": "500",
"SlotSetting": false
},
{
"Name": "Simulation:Planifications:0:GroupName",
"Value": "YourGroup",
"SlotSetting": false
},
{
"Name": "Simulation:Planifications:0:At",
"Value": "07:00:00",
"SlotSetting": false
},
{
"Name": "Simulation:Planifications:0:Status",
"Value": "10",
"SlotSetting": false
}
]