How can I get @JsonIgnore to work I have a class. And even if I put the annotation there it has no effect on the output. I am using Jackson.
public class Que
I added @Getter(onMethod_=@JsonIgnore) for boolean.
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class TestClass {
@JsonIgnore
private String name;
@Getter(onMethod_=@JsonIgnore)
private boolean isValid;
}