I have the following simple class:
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@JsonIgnoreProperties({ \"thirdField\" })
public class Message
I found a Solution to this. Try to add
@JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
About your class
@JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
class ResponseModel {
//your properties here
@JsonIgnoreProperties("messageList","contactList","sender")
var contactList= ArrayList()
}
That will solve your issue buddy.