title: Deserialization of inteface types not supported using System.Text.JSON
body: <p>I am passing in a valid JSON object to my controller on my .net core 3 web api application.  Doing so, I get the error:</p>
  
  <blockquote>
    <p>System.NotSupportedException: Deserialization of interface types is not supported. Type 'OrderTranslationContracts.OrderContracts+IImportOrderLineModel'</p>
  </blockquote>
  
  <p>So I looked in my code and I have the following concrete implementation of an Interface.  Here is the line I think that's throwing the error:</p>
  
  <pre><code>   public List&lt;OrderContracts.IImportOrderLineModel&gt; Lines { get; set; }
  </code></pre>
  
  <p>Here is the portion of the JSON I am passing into the controller:</p>
  
  <pre><code>"lines": [
          {
              "orderNumber": "LV21131327",
              "lineNumber": 1,
              "itemId": "3083US",
              "customerItemId": "3083US",
              "quantity": 3,
              "price": 0.00,
              "quantityBackOrdered": null,
              "comments": "",
              "pickLocation": "",
              "orderFilled": "O",
              "hostUom": null,
              "type": null
          }
  </code></pre>
  
  <p>So I know the JSON is valid.  Here is the signature for the controller:</p>
  
  <pre><code>[HttpPost]
      public async Task&lt;List&lt;ImportOrderModel&gt;&gt; Post([FromBody] List&lt;ImportOrderModel&gt; orders)
      {
          var response = await _validateOrder.ValidateAllOrdersAsync(orders, null);
          return response;
      }
  </code></pre>
  
  <p>I don't even break into this code as I am assuming that the JSON deserializer is throwing the error as it tries to convert it.  So how do I over come this error?  I am bound by the concrete implementation for the interface so I can't change the interface I need to work with what I have here if possible.  If that isn't possible, are there any "work arounds" for this?</p>