title: Can Jackson be configured to trim leading/trailing whitespace from all string properties?
body: <p>Example JSON (note that the string has trailing spaces): </p>
  
  <pre><code>{ "aNumber": 0, "aString": "string   " }
  </code></pre>
  
  <p>Ideally, the deserialised instance would have an <strong>aString</strong> property with a value of <strong>"string"</strong> (i.e. without trailing spaces).  This seems like something that is probably supported but I can't find it (e.g. in <em>DeserializationConfig.Feature</em>).</p>
  
  <p>We're using Spring MVC 3.x so a Spring-based solution would also be fine.</p>
  
  <p>I tried configuring Spring's WebDataBinder based on a suggestion in a <a href="http://forum.springsource.org/archive/index.php/t-102013.html" rel="noreferrer">forum post</a> but it does not seem to work when using a Jackson message converter:</p>
  
  <pre><code>@InitBinder
  public void initBinder( WebDataBinder binder )
  {
      binder.registerCustomEditor( String.class, new StringTrimmerEditor( " \t\r\n\f", true ) );
  }
  </code></pre>