title: Force JsonConvert.SerializeXmlNode to serialize node value as an Integer or a Boolean
body: <p>The <code>SerializeXmlNode</code> function from <code>Newtonsoft.Json.JsonConvert</code> class always outputs the value of the last child nodes of a XML as a string type in the serialization process, when sometimes you might need them to be serialized as an Integer or a Boolean.</p>
  
  <p>Sample code:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Object&gt;
    &lt;ID&gt;12&lt;/ID&gt;
    &lt;Title&gt;mytitle&lt;/Title&gt;
    &lt;Visible&gt;false&lt;/Visible&gt;
  &lt;/Object&gt;
  </code></pre>
  
  <p>Output:</p>
  
  <pre class="lang-js prettyprint-override"><code>{ "ID" : "12",
    "Title" : "mytitle",
    "Visible" : "false"
  }
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre class="lang-js prettyprint-override"><code>{ "ID" : 12,
    "Title" : "mytitle",
    "Visible" : false
  }
  </code></pre>
  
  <p>Is there a way to force a XML node to be serialized as a Integer or a Boolean?</p>
  
  <p>Thank you.</p>
  
  <p>Note: Please avoid posting workarounds when the XML is already serialized to a JSON string, as those workarounds are the ones that we are willing to avoid. </p>