title: How to deserialize JSON list to C# List of objects
body: <p>from the AWS lambda I get this JSON string:</p>
  <pre><code>[{&quot;Id&quot;:19162,&quot;LotId&quot;:21243,&quot;LotNumber&quot;:&quot;H6469&quot;,&quot;LotType&quot;:20,&quot;ConfirmationStatus&quot;:0,&quot;Date&quot;:&quot;2016-02-17T10:51:06.757&quot;},{&quot;Id&quot;:19163,&quot;LotId&quot;:21244,&quot;LotNumber&quot;:&quot;H6469a&quot;,&quot;LotType&quot;:20,&quot;ConfirmationStatus&quot;:0,&quot;Date&quot;:&quot;2016-02-17T10:51:19.933&quot;}]
  </code></pre>
  <p>I have declared a class to which I want to deserialize the data received from this API.</p>
  <pre><code>public class GetWesLotToGenerateReturn
      {
          public long Id { get; set; }
          public long LotId { get; set; }
          public string LotNumber { get; set; }
          public int LotType { get; set; }
          public int ConfirmationStatus { get; set; }
          public DateTime Date { get; set; }
      }
  </code></pre>
  <p>I'm trying to do this:</p>
  <pre><code>List&lt;GetWesLotToGenerateReturn&gt; sample = JsonSerializer.Deserialize&lt;List&lt;GetWesLotToGenerateReturn&gt;&gt;(lots);
  </code></pre>
  <p>And I receive this error:</p>
  <pre><code>The JSON value could not be converted to System.Collections.Generic.List`1[Service.App.Models.AdaptersModels.GetWesLotToGenerateReturn]. Path: $ | LineNumber: 0 | BytePositionInLine: 268.
  </code></pre>
  <p>How can I properly deserialize JSON from a list to a list of objects in C#?</p>
  <p>Thanks in advance!</p>