@JsonIncludeProperties does not work together with @JsonIdentityInfo (original) (raw)

In version 2.12.3, using @JsonIncludeProperties in combination with @JsonIdentityInfo at the nested class returns only the identity field instead of the selected properties that should be included.

@JsonIdentityInfo(generator= ObjectIdGenerators.PropertyGenerator.class, property="deviceId") public class Device{ private UUID deviceId;

private String name;

}

public class Config { @JsonIncludeProperties({"name"}) private Device device; }

returns, for example,

{"device": "b16c3254-ee2e-11e7-8c3f-fa085a82f01f"}