Jackson: how to prevent field serialization [duplicate]

You can mark it as @JsonIgnore.

With 1.9, you can add @JsonIgnore for getter, @JsonProperty for setter, to make it deserialize but not serialize.

Leave a Comment