title: Ignore specific field on serialization with Jackson
body: <p>I'm using the Jackson library.</p>
  
  <p>I want to ignore a specific field when serializing/deserializing, so for example:</p>
  
  <pre><code>public static class Foo {
      public String foo = "a";
      public String bar = "b";
  
      @JsonIgnore
      public String foobar = "c";
  }
  </code></pre>
  
  <p>Should give me:</p>
  
  <pre><code>{
  foo: "a",
  bar: "b",
  }
  </code></pre>
  
  <p>But I'm getting:</p>
  
  <pre><code>{
  foo: "a",
  bar: "b",
  foobar: "c"
  }
  </code></pre>
  
  <p>I'm serializing the object with this code:</p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  String out = mapper.writeValueAsString(new Foo());
  </code></pre>
  
  <p>The real type of the field on my class is an instance of the Log4J Logger class. What am I doing wrong?</p>