title: Why don't the configuration values in my appsettings.json file map to my custom POCO object's fields via Configuration.GetSection().Get<MyObject>?
body: <p>I have some appsettings.json config file:</p>
  
  <pre><code>{
    "PocoSettings": {
      "ValueOne": "Foo",
      "ValueTwo": "Bar"
    }
  }
  </code></pre>
  
  <p>and a settings object that it should populate:</p>
  
  <pre><code>public class PocoSettings
  {
      public string ValueOne;
      public string ValueTwo;
  }
  </code></pre>
  
  <p>I try to populate it in my Startup.cs file:</p>
  
  <pre><code>public Startup(IHostingEnvironment env)
  {
      var builder = new ConfigurationBuilder()
          .SetBasePath(env.ContentRootPath)
          .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
          .AddEnvironmentVariables();
      this.Configuration = builder.Build();
  }
  public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
  {
      var MySettings = this.Configuration.GetSection("PocoSettings").Get&lt;PocoSettings&gt;();
  
      // Inject MySettings into your DI container of choice here.
  }
  </code></pre>
  
  <p>The <code>MySettings</code> object is created, but the values are not populated. <code>ValueOne</code> and <code>ValueTwo</code> are both null. Why?</p>