-
-
Notifications
You must be signed in to change notification settings - Fork 337
Closed
Description
Let's say you have 1 entity with cascade need to be serialized, when you only need serialize part of cascaded entity, you should do it as following:
class Organization{
private int id;
private String name;
private String address;
private String telehpone;
private String website;
......
}
class Person{
private int id;
private String firstName;
private String lastName;
@JsonIgnoreProperties({"address","telephone","website"})
private Organization organization;
}
but what if the ignored properties is too many and I only need the id and name properties to be serialized?A @JsonOnlyProperties
or @JsonIncludeProperties
is more convenient and very easy to use.
Think this scenario is most needed.
ccasallas and jbabbidge
Metadata
Metadata
Assignees
Labels
No labels