I have the following setup in my Startup:
var builder = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", true, true);
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", true, true)
appsettings.json:
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
I know I can override the effective settings for a given environment by adding a matching JSON structure with different values and omitting those I want to inherit, e.g. appsettings.Development.json:
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
But can I remove an entry or a section except by overriding each value property with an empty value?
-S