title: C# force integer when converting XML to JSON
body: <p>I am attempting to convert XML into JSON in order to generate a HTTP POST request to an API. I am getting an error because one of the fields is meant to be an integer instead of a string. From what i have read adding "json:Integer="true"" to the node will cause it to become an int, but this doesnt seem to be working for me. Here is the xml and the resulting json. The arrays are working, but the integer is not. </p>
  
  <pre><code>&lt;shipments json:Array="true" xmlns:json="http://james.newtonking.com/projects/json"&gt;
      &lt;shipment_tracking_number /&gt;
      &lt;response_shipment_date&gt;2016-10-18T01:00:00.0000000-04:00&lt;/response_shipment_date&gt;
      &lt;response_shipment_method&gt;UPS Ground&lt;/response_shipment_method&gt;
      &lt;expected_delivery_date&gt;2016-10-18T01:00:00.0000000-04:00&lt;/expected_delivery_date&gt;
      &lt;ship_from_zip_code&gt;12345&lt;/ship_from_zip_code&gt;
      &lt;carrier_pick_up_date&gt;2016-10-18T01:00:00.0000000-04:00&lt;/carrier_pick_up_date&gt;
      &lt;carrier&gt;UPS&lt;/carrier&gt;
      &lt;shipment_items json:Array="true"&gt;
          &lt;shipment_item_id&gt;FF12345K&lt;/shipment_item_id&gt;
          &lt;alt_shipment_item_id&gt;1234567890&lt;/alt_shipment_item_id&gt;
          &lt;merchant_sku&gt;B00xxxx&lt;/merchant_sku&gt;
          &lt;response_shipment_sku_quantity json:Integer="true"&gt;1&lt;/response_shipment_sku_quantity&gt;
      &lt;/shipment_items&gt;
  &lt;/shipments&gt;
  </code></pre>
  
  <blockquote>
    <p>string jsonrequest = JsonConvert.SerializeXmlNode(doc,
    Newtonsoft.Json.Formatting.None, true);</p>
  </blockquote>
  
  <pre><code>{"shipments":[
      {
          "shipment_tracking_number":null,
          "response_shipment_date":"2016-10-18T01:00:00.0000000-04:00",
          "response_shipment_method":"UPS Ground",
          "expected_delivery_date":"2016-10-18T01:00:00.0000000-04:00",
          "ship_from_zip_code":"12345",
          "carrier_pick_up_date":"2016-10-18T01:00:00.0000000-04:00",
          "carrier":"UPS",
          "shipment_items":[
          {
              "shipment_item_id":"FF12345K",
              "alt_shipment_item_id":"1234567890",
              "merchant_sku":"B00xxxx",
              "response_shipment_sku_quantity":"1"
          }]
      }]
  }
  </code></pre>
  
  <p>I need <code>"response_shipment_sku_quantity":"1"</code> to show up as <code>"response_shipment_sku_quantity":1</code>, but it doesnt seem to be working. I can modify the XML or the code that performs the conversion. I dont mind which as long as this can be done.  </p>