title: Convert DataTable to JSON with key per row
body: <p>I thought the following would be a pretty common task and assumed there would be an easy solution for it, but i can't find one.</p>
  
  <p>If I have a datatable in the following structure.</p>
  
  <pre><code>ID  Name    Active
  ID1 John    TRUE
  ID2 Bill    FALSE
  </code></pre>
  
  <p>I would like to serialize it as a JSON object where the ID column is a node in the JSON object like:</p>
  
  <pre><code>[
      {
          "ID1": {
              "Name": "John",
              "Active": "True"
          },
          "ID2": {
              "Name": "Bill",
              "Active": "False"
          }
      }
  ]
  </code></pre>
  
  <p>I looked into JSON.NET but could not get it to work. 
  Edit: I'm using C#</p>