In my ASP.NET 5 (RC1) code I have an appsetting.json that looks something like this:
{
\"SomeSettings\": {
\"PropA\": \"ValueA\",
\"PropB
Adding the settings under "App settings" like this will do the trick... Notice the ":0" and ":1" below
Format: Key -> Value
SomeSettings:PropA -> AzureValueA
SomeSettings:PropB:0 -> AzureValueB1
SomeSettings:PropB:1 -> AzureValueB2
If you aren't running on Windows, replace the colon :
with double underscore __
to get your app to see the settings. So instead of e.g. SomeSettings:PropA
, you'd use SomeSettings__PropA
.
Simple approach is store the JSON as string in AppSetting, and de-serialize by yourself
var serializer = new JavaScriptSerializer();
var settings = serializer.Deserialize<SomeSettings>(configuration.GetSection("SomeSettings"));
or you will have to create your own customer configuration i believe. https://msdn.microsoft.com/en-us/library/2tw134k3.aspx