title: How to accept List<string> in API controller's method from body as json?
body: <p>I'd want to send to my API controller's method json like this:</p>
  <pre><code>{
      &quot;lines&quot;:
      [
          &quot;asd1&quot;,
          &quot;asd2&quot;
      ]
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/xnKIf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xnKIf.png" alt="enter image description here" /></a></p>
  <p>I've been trying those params</p>
  <pre><code>[HttpPost]
  public IActionResult Test([FromBody]List&lt;string&gt; lines)
  {
  
  }
  
  
  [HttpPost]
  public IActionResult Test([FromBody]string[] lines)
  {
  
  }
  
  
  [HttpPost]
  public IActionResult Test([FromBody]string lines)
  {
  
  }
  </code></pre>
  <p>But it's always either empty or null</p>
  <p>Any idea?</p>