Jackson serialization: how to ignore superclass properties

后端 未结 5 929
走了就别回头了
走了就别回头了 2020-12-10 00:58

I want to serialize a POJO class which is not under my control, but want to avoid serializing any of the properties which are coming from the superclass, and not from the fi

5条回答
  •  独厮守ぢ
    2020-12-10 01:14

    Add the following annotation in your Base Class :

    @JsonInclude(Include.NON_NULL)
    

提交回复
热议问题