title: Jackson ignoring @JsonIgnore?
body: <p>I have a class with a 'read-only' function that shouldn't get serialized into a JSON object. Because the function's name starts with "get", Jackson grabs it, and does not seem to respect the attached <code>@JsonIgnore</code> tag:</p>
  
  <pre><code>import org.codehaus.jackson.annotate.JsonIgnore;
  
  public class MyClass {
  
      publicMyClass() {}
  
      @JsonIgnore
      public String getSomeValue() {return "";}
  }
  </code></pre>
  
  <p>I also tried using the following syntax:</p>
  
  <pre><code>import org.codehaus.jackson.annotate.JsonIgnoreProperties;
  
  @JsonIgnoreProperties({"someValue"})
  public class MyClass {
  
      publicMyClass() {}
  
      public String getSomeValue() {return "";}
  }
  </code></pre>
  
  <p>In either case the resultant JSON output is the same:</p>
  
  <pre><code>{someValue:""}
  </code></pre>
  
  <p>(We're using Jackson 1.9.13 with Spring MVC.)</p>
  
  <p>Other than renaming the function to start with something other than "get", what can I do to prevent Jackson from serializing this function's output?</p>