title: How to pass DateTime object as json in .net web api
body: <p>I Have a model which has DateTime type in it:</p>
  
  <pre><code>    public class ToDo
      {
          public int id { get; set; }
          public int parentId { get; set; }
          public string note { get; set; }
          public DateTime due { get; set; }
          public ToDo(int id, int parentId, string note, DateTime due)
          {
              this.id = id;
              this.parentId = parentId;
              this.note = note;
              this.due = due;
          }
      }
  </code></pre>
  
  <p>I've created a controller for this class to send my post requests through api. but I don't know how to bind DateTime type to json i've tried a request with the following body but it didn't work out:</p>
  
  <pre><code>    {"parentId":1,"note":"hello world","due":{"year":2017,"month": 11,"day":25}}
  </code></pre>
  
  <p>How should I post the DateTime type?</p>