I know i could add all my environment vars under the values {} section of local.settings.json. I am however trying to keep a tidy home and would like if I could do something like this.
local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "",
"Hello": "world"
},
"ClientConfiguration": {
"this": "that",
"SubscriberEndpoint": "",
"Username": "",
"Password": "",
"ObjectEndpoint": ""
}
}
in my code i have
var config = JsonConvert.DeserializeObject<myConnectionObject> (Environment.GetEnvironmentVariable("ClientConfiguration"));
No matter what I do I cannot get this to work. Why can't I at least get the contents of ClientConfiguration? Just keeps coming back null.
IF I add ClientConfiguration {} to the values like
..."Values" : { ...
"Hello":"world",
"ClientCOnfiguration" : {above}
}
I end up with an error saying azurewebjobsstorage can't be found and 'func settings list' is just empty