title: Unmarshalling JSON using Jackson when having inner class without default constructor
body: <p>I marshaled a class object having an inner class (non-static) using Jackson library which worked absolutely fine. However, I am getting problem while un-marshaling the object. Reason being my inner class doesn't have any default constructor. I have copied sample code here:</p>
  
  <pre><code>public class JsonMarshallUnMarshall {
  public static void main(String[] args) {
  Person person = new Person();
  person.setId(2222);
  person.setName("My Name");
  Person.Student student = person.new Student(44887);
  person.setStudent(student);
  String personJsonValue = null;
  
  // Marshalling
  System.out.println("====Marshalling====");
  ObjectMapper mapper = new ObjectMapper();
  mapper.getSerializationConfig().addMixInAnnotations(Person.Student.class, MixIn.class);
  mapper.getDeserializationConfig().addMixInAnnotations(Person.Student.class, MixIn.class);
  
  try {
  personJsonValue = mapper.writeValueAsString(person);
  System.out.println(personJsonValue);
  } catch (JsonGenerationException e) {
  e.printStackTrace();
  } catch (JsonMappingException e) {
  e.printStackTrace();
  } catch (IOException e) {
  e.printStackTrace();
  }
  
  // UnMarshalling
  System.out.println("====Unmarshalling====");
  Person unMarshalledPerson = null;
  try {
  unMarshalledPerson = mapper
  .readValue(personJsonValue, Person.class);
  System.out.println("id: " + unMarshalledPerson.getId());
  System.out.println("name: " + unMarshalledPerson.getName());
  System.out.println("student id: " + unMarshalledPerson.getStudent().getStudentId());
  } catch (JsonParseException e) {
  e.printStackTrace();
  } catch (JsonMappingException e) {
  e.printStackTrace();
  } catch (IOException e) {
  e.printStackTrace();
  }
  }
  }
  
  class Person {
  private int id;
  private String name;
  private Student student;
  public Person() {
  }
  public Student getStudent() {
  return student;
  }
  public void setStudent(Student student) {
  this.student = student;
  }
  public int getId() {
  return id;
  }
  public void setId(int id) {
  this.id = id;
  }
  public String getName() {
  return name;
  }
  public void setName(String name) {
  this.name = name;
  }
  public class Student {
  private int studentId;
  public int getStudentId() {
  return studentId;
  }
  public void setStudentId(int studentId) {
  this.studentId = studentId;
  }
  public Student(int studentId) {
  this.studentId = studentId;
  }
  }
  }
  
  abstract class MixIn {
  public MixIn(@JsonProperty("studentId") int newStudentId) {
  }
  @JsonProperty("studentId")
  abstract int getNewStudentId();
  }
  </code></pre>
  
  <p>On executing the code, I get an exception as:</p>
  
  <pre><code>org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type [simple type, class com.tnsi.cnam.batch.utilities.Person$Student]: can not instantiate from JSON object (need to add/enable type information?)
  at [Source: java.io.StringReader@1abab88; line: 1, column: 41] (through reference chain: com.tnsi.cnam.batch.utilities.Person["student"])
  </code></pre>
  
  <p>Is there any way around for this problem... I can't put default constructor because the actual class comes from thirdparty jar.</p>