title: RestTemplate ignores @JsonIgnoreProperties(ignoreUnknown = true) annotation
body: <p><code>RestTemplate</code>'s <code>getForObject</code> method ignores the <code>@JsonIgnoreProperties(ignoreUnknown = true)</code> annotation on the class.</p>
  
  <p>E.g. for</p>
  
  <pre><code>@JsonIgnoreProperties(ignoreUnknown = true)
  public class Stock extends AbstractSObject
  {
    // fields
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>RestTemplate rest = new RestTemplate();
  Stock s = rest.getForObject("address", Stock.class);
  </code></pre>
  
  <p>I'm getting the following error</p>
  
  <blockquote>
    <p>Could not read JSON: Unrecognized field "SomeField" (class
    sandbox.Stock), not marked as ignorable</p>
  </blockquote>