In .net core if we have to bind the configuration directly from Json configuration as shown below
{
"AzureAdJwtSettings": {
"Authority": "https://login.microsoftonline.com/tenantid",
},
"WebSecJwtSettings": {
"Authority": "https://example.com",
}
}
we can write something like this
configuration.Bind("AzureAdJwtSettings", options);
I am looking to find a way so that I can group my json configuration in such a way
{
"JwtSettings": {
"AzureAdJwtSettings": {
"Authority": "https://login.microsoftonline.com/tenantid"
},
"WebSecJwtSettings": {
"Authority": "https://example.com"
}
}
}
But when I try to load the configuration in my code it didn't load properly.. I am using the below code
configuration.Bind("JwtSettings.AzureAdJwtSettings", options);
I know there must be way to load nested properties but couldn't find it working...
:) instead of dot (.)