title: Json Jackson deserialization without inner classes
body: <p>I have a question concerning Json deserialization using Jackson.
  I would like to deserialize a Json file using a class like this one:
  (taken from <a href="http://wiki.fasterxml.com/JacksonInFiveMinutes" rel="nofollow noreferrer">http://wiki.fasterxml.com/JacksonInFiveMinutes</a>)</p>
  
  <pre><code>public class User 
  {
      public enum Gender { MALE, FEMALE };
      public static class Name {
        private String _first, _last;
        public String getFirst() { return _first; }
        public String getLast() { return _last; }
        public void setFirst(String s) { _first = s; }
        public void setLast(String s) { _last = s; }
      }
      private Gender _gender;
      private Name _name;
      private boolean _isVerified;
      private byte[] _userImage;
      public Name getName() { return _name; }
      public boolean isVerified() { return _isVerified; }
      public Gender getGender() { return _gender; }
      public byte[] getUserImage() { return _userImage; }
      public void setName(Name n) { _name = n; }
      public void setVerified(boolean b) { _isVerified = b; }
      public void setGender(Gender g) { _gender = g; }
      public void setUserImage(byte[] b) { _userImage = b; }
  }
  </code></pre>
  
  <p>A Json file can be deserialized using the so called "Full Data Binding" in this way:</p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  User user = mapper.readValue(new File("user.json"), User.class);
  </code></pre>
  
  <p>My problem is the usage of the inner class "Name". I would like to do the same thing without using inner classes. The "User" class would became like that:</p>
  
  <pre><code>import Name;
  import Gender;
  public class User 
  {
      private Gender _gender;
      private Name _name;
      private boolean _isVerified;
      private byte[] _userImage;
      public Name getName() { return _name; }
      public boolean isVerified() { return _isVerified; }
      public Gender getGender() { return _gender; }
      public byte[] getUserImage() { return _userImage; }
      public void setName(Name n) { _name = n; }
      public void setVerified(boolean b) { _isVerified = b; }
      public void setGender(Gender g) { _gender = g; }
      public void setUserImage(byte[] b) { _userImage = b; }
  }
  </code></pre>
  
  <p>This means to find a way to specify to the mapper all the required classes in order to perform the deserialization.</p>
  
  <p>Is this possible? I looked at the documentation but I cannot find any solution.</p>
  
  <p>My need comes from the fact that I use the Javassist library to create such classes, and it does not support inner or anonymous classes.</p>
  
  <p>Thank you in advance</p>