title: JSON Jackson flat json to composite java object
body: <p>I was wondering if someone could suggest the recommended way to covert flat JSON into a complex java object.
  Example JSON</p>
  
  <pre><code>{account_id: 1, user_id:3, user_name:john ... }
  </code></pre>
  
  <p>But my java class needs to be</p>
  
  <pre><code>class Account {
      int account_id;
      User user;
  }
  </code></pre>
  
  <p>And here is the user object...</p>
  
  <pre><code>class User {
      int user_id;
      String user_name;
  }
  </code></pre>
  
  <p>It looks like I could go from JSON to java using the Jackson constructor to create the object the way I need but I also need to covert the java object into a flat JSON. 
  Do I need to use a serializer/deserializer for each class or is there a way I can do it with simple annotations... By maybe telling it to ignore the user object but not what's inside it.. </p>
  
  <p>Let me know what your ideas are. Thanks</p>