Description
Json config
"TestSection": {
"Test-Null": null,
"Test-Key:": ""
}
Code
builder.AddJsonFile(jsonPath, true, false);
var config = builder.Build();
var children = config.GetSection("TestSection").GetChildren();
foreach (var child in children)
{
Console.WriteLine($"{child.Key}: {child.Value}");
}
Result
In NET9.0 (Correct)
section TestSection Test-Key value is string.Empty
In NET10 (Incorrent)
section TestSection Test-Key value is NULL
Reproduction Steps
repro project
ConsoleApp1.zip
Expected behavior
In NET9.0
section TestSection Test-Key value is string.Empty
In NET10
section TestSection Test-Key value is string.Empty
Actual behavior
In NET9.0
section TestSection Test-Key value is string.Empty
In NET10
section TestSection Test-Key value is NULL
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response