title: Jackson JSON library: how to instantiate a class with abstract fields that can't access its concrete representation?
body: <p>This is the same questions than :</p>
  
  <p><a href="https://stackoverflow.com/questions/5489532/jackson-json-library-how-to-instantiate-a-class-that-contains-abstract-fields">Jackson JSON library: how to instantiate a class that contains abstract fields</a></p>
  
  <p>Nevertheless its solution is not possible since my abstract class is in another project than the concrete one.</p>
  
  <p>Is there a way then ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>My architecture is as follows:</p>
  
  <pre><code>public class UserDTO {
  
      ...
      private LanguageDTO lang;
  
  }
  </code></pre>
  
  <p>I send that object user :</p>
  
  <pre><code>restTemplate.postForObject(this.getHttpCore().trim() + "admin/user/save/1/" + idUser, userEntity, UserDTO.class);
  </code></pre>
  
  <p>Then I am supposed to receive it in the function :</p>
  
  <pre><code> @RequestMapping(value = "/save/{admin}/{idUser}", method = RequestMethod.POST)
      public String saveUserById(@RequestBody final UserEntity user, @PathVariable Integer idUser, @PathVariable boolean admin)
  </code></pre>
  
  <p>with UserEntity defined as :</p>
  
  <pre><code>public class UserEntity extends AbstractUserEntity {
      ...
  
  }
  
  public abstract class AbstractUserEntity {
  
      ...
      private AbstractLanguageEntity lang;
  }
  </code></pre>
  
  <p>I would like to know how I can specify that lang should be instantiate as LanguageEntity whereas abstract classes are in another project.</p>