📜  jackson 在返回时忽略属性 - 无论代码示例

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

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

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