📜  杰克逊避免返回属性 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:56.479000             🧑  作者: Mango

代码示例1
//....getter, setter of Person class
@JsonIgnore
public List getEvents() {
    return events;
}

@JsonProperty("events")
public Event[] getEventsArr() {
    return events.toArray(new Event[0]);
}