Describe the bug
Im reading a json file to a dictionary<string,string> like:
{
"auths": {
"https://www.google.es": {
"uri": "https://www.google.es"
}
}
}
having the POCO class
public class MyClass
{
[ConfigurationProperty("auths", IsRequired = false)]
public Dictionary<string, OtherObject> Auths { get; set; }
}
When i load it using ConfigurationRoot like
public MyClass Read()
{
IConfigurationRoot configuration =
new ConfigurationBuilder()
.AddJsonFile("path_to_json_file", optional: true, reloadOnChange: true)
.Build();
// Try Parse and return (if will exception in case of binding error)
var _settings= new MyClass();
configuration.Bind(_settings);
return _settings;
}
The issue is that the Dictionary item contains https only on the Key property. Looks like it's ignoring or having issues with https://.....
Not sure if it's an intended feature or a bug.
To Reproduce
Steps to reproduce the behavior:
- Using version '3.1.8' of package 'Microsoft.Extensions.Configuration.Json'
- Run this code 'with files in description'
- See error in the screenshot attached
Expected behavior
Dictionary Key Item should contains https://www.google.es
Screenshots
