title: Is my ajax-sourced DataTable not parsing correctly?
body: <p>Let's start with the error I'm getting...</p>
  
  <pre class="lang-none prettyprint-override"><code>DataTables warning: tableid=myTable - Requested
  unknown parameter 'Name' for row 0, column 0. For more
  information about this error, please see http://datatables.net/tn/4
  </code></pre>
  
  <p>I've run the JSON response through <em>jsonlint</em> to verify its validity, and inspected it to check that both the data properties exist and are non-null (so it's not an issue of needing <code>defaultContent</code>). Here is the relevant code:</p>
  
  <h3>HTML</h3>
  
  <pre class="lang-html prettyprint-override"><code>&lt;table id="myTable" name="myTable" class="table table-hover"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Submitter&lt;/th&gt;
              &lt;th&gt;Submit Date&lt;/th&gt;
              &lt;th&gt;Is Restricted&lt;/th&gt;
              &lt;th&gt;Libraries&lt;/th&gt;
              &lt;th&gt;RequestID&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  &lt;/table&gt;
  </code></pre>
  
  <h3>JS</h3>
  
  <pre class="lang-js prettyprint-override"><code>var table = $("#myTable").DataTable({
      ajax: {
          url: "MyPage.aspx/GetRequests",
          dataSrc: "d",
          type: "POST",
          contentType: "application/json; charset=utf-8"
      },
      columns: [
          { data: "Name", name: "submitter" },
          { data: "SubmitDate", name: "submit-date" },
          { data: "IsRestricted", name: "is-restricted" },
          { data: "Libraries", name: "libraries" },
          { data: "RequestID", name: "request-ID" }
      ],
      info: false,
      paging: false,
      searching: false,
      select: "single"
  });
  </code></pre>
  
  <p><code>dataSrc: "d"</code> is for the property to read in the response:</p>
  
  <p><img src="https://i.imgur.com/MyhOZbP.png" alt="as a nested property d of the response"></p>
  
  <p>And here is a snippet of the JSON response:
  </p>
  
  <pre><code>{"d":"[{
      \"RequestID\":50,
      \"Status\":0,
      \"Libraries\":
          [{\"l_id\":0,
          \"library_name\":\"Cat Books\",
          \"request_id\":50,
          \"action\":0,
          \"action_by\":null,
          \"granted_by\":null,
          \"action_date\":\"\\/Date(1488475446477)\\/\"},
          {\"l_id\":0,
          \"library_name\":\"Dog Books\",
          \"request_id\":50,
          \"action\":0,
          \"action_by\":null,
          \"granted_by\":null,
          \"action_date\":\"\\/Date(1488475446477)\\/\",
          }],
      \"Name\":\"Alshon Jeffrey\",
      \"Department\":null,
      \"SubmitDate\":\"\\/Date(1488475446477)\\/\",
      \"IsRestricted\":true}]"}
  </code></pre>
  
  <p>The table (after the error alerts twice), looks like this:</p>
  
  <p><img src="https://i.imgur.com/0NFLKVb.png" alt="all null cells"></p>
  
  <p>I've tried nulling the Libraries property to make sure DataTables isn't trying to parse that collection into the table, same error. Is the <code>d</code> in the response still throwing DataTables off? Or is the table structure not right? I tried adding a <code>tbody</code> placeholder with no luck, and again with <code>tbody &gt; tr &gt; td</code> placeholders. I'm pretty much out of ideas at this point...</p>
  
  <p>In case it matters, this is with asp.net webforms and a <code>[WebMethod]</code> using a <code>JavaScriptSerializer</code>.</p>
  
  <h3>EDIT</h3>
  
  <p>Here's the server side code I use to produce the JSON. I've tried <code>JavaScriptSeralizer</code> and <code>JsonConvert</code>, both methods seem to me to produce the same JSON, and the JSON in the response for both is in <code>d</code>:</p>
  
  <pre class="lang-c# prettyprint-override"><code>[WebMethod]
  [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
  public static string GetRequests()
  {
      var requests = DataGetter.GetRequests().OrderBy(r =&gt; r.SubmitDate).ToList();
  
      return new JavaScriptSerializer().Serialize(requests);
  
      // Have also tried:
      // return JsonConvert.SerializeObject(requests);
  }
  </code></pre>