title: How to return IEnumerable list of objects with WebApi?
body: <p>I have an object called PostMapDB and a method which retrieves a list of those objects. I would like to be able to pass this list and retrieve the data using webapi. </p>
  
  <p>The code bellow gets me an error:<code>{"":["The input was not valid."]}</code></p>
  
  <pre><code>[HttpGet]
  public string Get(PostMapDB list)
  {
      IEnumerable&lt;PostMapDB&gt; dataOfPosts = list.getAllPosts().OrderBy(x =&gt; x.Date);
  
      var data = JsonConvert.SerializeObject(dataOfPosts, new JsonSerializerSettings()
      {
          ContractResolver = new DefaultContractResolver()
          {
              IgnoreSerializableAttribute = false
          }
      });
  
      return data;
  }
  </code></pre>