Skip to content

@JsonIncludeProperties does not work together with @JsonIdentityInfo #3169

Description

@chtinnes

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"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions