title: Use class name as root key for JSON Jackson serialization
body: <p>Suppose I have a pojo:</p>
  
  <pre><code>import org.codehaus.jackson.map.*;
  
  public class MyPojo {
      int id;
      public int getId()
      { return this.id; }
  
      public void setId(int id)
      { this.id = id; }
  
      public static void main(String[] args) throws Exception {
          MyPojo mp = new MyPojo();
          mp.setId(4);
          ObjectMapper mapper = new ObjectMapper();
          mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
          System.out.println(mapper.getSerializationConfig().isEnabled(SerializationConfig.Feature.WRAP_ROOT_VALUE));
          System.out.println(mapper.writeValueAsString(mp));
      }
  }
  </code></pre>
  
  <p>When I serialize using the Jackson ObjectMapper, I just get </p>
  
  <pre><code>true
  {"id":4}
  </code></pre>
  
  <p>but I want </p>
  
  <pre><code>true
  {"MyPojo":{"id":4}}
  </code></pre>
  
  <p>I've searched all over, Jacksons documentation is really unorganized and mostly out of date. </p>