title: Remove trailing spaces in json string c#
body: <p>I have a large json string that I need to remove any number of leading and trailing spaces from property values (in c#) e.g.</p>
  
  <pre><code>"Some Property Name": " Some Value "
  </code></pre>
  
  <p>needs to change to:-</p>
  
  <pre><code>"Some Property Name": "Some Value"
  </code></pre>
  
  <p>I have the option to do this via a regex replace on the json string before it is converted into a newtonsoft json object, or loop through the json object's properties after it has been converted.  </p>
  
  <p>Anybody any thoughts on the best way to do this?</p>