title: Deserialization JAXBElement with jackson
body: <p>I have a such model:</p>
  
  <pre><code>public class Type {
  
      @XmlElementRef(name = "ConversationId", namespace = "...", type = JAXBElement.class, required = false)
      protected JAXBElement&lt;String&gt; conversationId;
  }
  </code></pre>
  
  <p>and part of json:</p>
  
  <pre><code>  "conversationId": {
      "declaredType": "java.lang.String",
      "globalScope": false,
      ...,
      "value": "ABC000000001"
    },
  </code></pre>
  
  <p>I tried use this mapper for deserialization:</p>
  
  <pre><code>public static interface JAXBElementMixin {
      @JsonValue
      Object getValue();
  }
  
  ObjectMapper mapper = new ObjectMapper();
  JaxbAnnotationIntrospector jaxbAnnotationIntrospector=new JaxbAnnotationIntrospector(mapper.getTypeFactory());
  JacksonAnnotationIntrospector jacksonAnnotationIntrospector=new JacksonAnnotationIntrospector();
  mapper.setAnnotationIntrospector(AnnotationIntrospector.pair(jaxbAnnotationIntrospector, jacksonAnnotationIntrospector));
  
  mapper.addMixIn(JAXBElement.class, JAXBElementMixin.class);
  </code></pre>
  
  <p>But in any case, my program doesn't work well I got:</p>
  
  <blockquote>
    <p>com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class javax.xml.bind.JAXBElement]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?)</p>
  </blockquote>
  
  <p>I wanted to read some docs about mixins, but there is outdated information on the offcial jackson's website, I use 2.5.1 version</p>