title: Map appsettings.json to Dictionary<string, Value>
body: <p>I have the following configuration </p>
  
  <pre><code>"Options": {
    "Host": "123",
    "UserName": "test",
    "Password": "test",
    "Files": [
      {
        "Key": "asd",
        "Value": {
          "HostLocation": "asd",
          "RemoteLocation": "asd"
        }
      }
    ]
  }
  </code></pre>
  
  <p>And I'm trying to bind it to the following object</p>
  
  <pre><code>public class Options
  {
      public string Host { get; set; }
      public string UserName { get; set; }
      public string Password { get; set; }
      public Dictionary&lt;string, FileOptions&gt; Files { get; set; }
  
      public class FileOptions
      {
          public string HostLocation { get; set; }
          public string RemoteLocation { get; set; }
      }
  }
  </code></pre>
  
  <p>The issue is when I'm trying to bind the the Files to the dictionary. They don't get bound. I get a key generated with the value of 1, and the value FileOptions are generated all with default string value.</p>
  
  <p>This is my configuration mapping.</p>
  
  <pre><code>_serviceCollection.Configure&lt;SftpOptions&gt;(_configuration.GetSection("Options"));
  </code></pre>
  
  <p>What is wrong and how can I map the setting into the Options class.</p>