I have an Azure function v3 in .NET core 3.1 Function works fine locally. Here is the local.settings.json:
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
},
"Foo": {
"Bar": {
"test1": true,
"test2": false
}
}
}
I need to write a configuration for a nested object like Foo:Bar:test1 in Azure function configuration.
How to express this nested object there?
The correct syntax for configuration options for Azure functions to express nested objects is to use double underscore: "CustomSettings__MySpecificSetting".
For a nested object in local.settings.json file:
"Foo": {
"Bar": {
"test1": true
}
}
The Azure configuration looks like:
Foo__Bar__test1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With