title: Show index values in JSON when serializing a list
body: <p>I have a class containing a list of items.  When I serialize the class I would like the item index values to appear in the JSON.</p>
  
  <p>I am using following code to convert into JSON:</p>
  
  <pre><code>var json = Newtonsoft.Json.JsonConvert.SerializeObject(imp);
  </code></pre>
  
  <p>Right now I am getting the output shown below:</p>
  
  <pre><code>{
      "userdata":{
          "name":"name",
          "type":"type",
          "company_name":"company_name"
      },
      "f_item":null,
      "o_item":null,
      "attributes":[
          {
              "firstval":"0",
              "name":"at 0",
              "opposite_name":"opname 0"
          },
          {
              "firstval":"1",
              "name":"at 1",
              "opposite_name":"opname 1"
          },
          {
              "firstval":"2",
              "name":"at 2",
              "opposite_name":"opname 2"
          },
          {
              "firstval":"3",
              "name":"at 3",
              "opposite_name":"opname 3"
          },
          {
              "firstval":"4",
              "name":"at 4",
              "opposite_name":"opname 4"
          }
      ],
      "eos":null
  }
  </code></pre>
  
  <p>I need output like this instead:</p>
  
  <pre><code>{
      "userdata":{
          "name":"name",
          "type":"type",
          "company_name":"company_name"
      },
      "f_item":null,
      "o_item":null,
      "attributes":{
          "0": {
              "firstval":"0",
              "name":"at 0",
              "opposite_name":"opname 0"
          },
          "1": {
              "firstval":"1",
              "name":"at 1",
              "opposite_name":"opname 1"
          },
          "2": {
              "firstval":"2",
              "name":"at 2",
              "opposite_name":"opname 2"
          },
          "3": {
              "firstval":"3",
              "name":"at 3",
              "opposite_name":"opname 3"
          },
          "4": {
              "firstval":"4",
              "name":"at 4",
              "opposite_name":"opname 4"
          }
      },
      "eos":null
  }
  </code></pre>
  
  <p>How can I configure Json.Net to output the index values?</p>