title: How to use class fields with System.Text.Json.JsonSerializer?
body: <p>I recently upgraded a solution to be all .NET Core 3 and I have a class that requires the class variables to be fields. This is a problem since the new <code>System.Text.Json.JsonSerializer</code> doesn't support serializing nor deserializing fields but only handles properties instead.</p>
  
  <p>Is there any way to ensure that the two final classes in the example below have the same exact values?</p>
  
  <pre><code>using System.Text.Json;
  
  public class Car
  {
      public int Year { get; set; } // does serialize correctly
      public string Model; // doesn't serialize correctly
  }
  
  static void Problem() {
      Car car = new Car()
      {
          Model = "Fit",
          Year = 2008,
      };
      string json = JsonSerializer.Serialize(car); // {"Year":2008}
      Car carDeserialized = JsonSerializer.Deserialize&lt;Car&gt;(json);
  
      Console.WriteLine(carDeserialized.Model); // null!
  }
  </code></pre>