jackson-databind
                                
                                 jackson-databind copied to clipboard
                                
                                    jackson-databind copied to clipboard
                            
                            
                            
                        Exception while deserializing with @JsonRootName
Desirialization does not work when there are multiple nodes available at same level as value provided in the JsonRootName
Note: Wrapper is configured with following:
objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
Class:
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonRootName(value = "response")
public class UserProfile {
  String name;
  String link;
}
Input JSON (which works):
{
  "response": {
    "name": "User one:",
    "link": "Some Link"
  }
}
Input JSON (which does not work)
{
  "response": {
    "name": "User one:",
    "link": "Some Link"
  }, 
  "apiVersion" : 1.0
}