I have a List of JSON Object where I want to take only those JSON object whose all the values are not null. If Any of the JSON Object field is null , I want to ignore the Complete JSON Object.
[
{
"id":"1",
"address": "abc",
"name": "edf"
},
{
"id": "2",
"address": null,
"name" : "cnh"
},
{
.
.
.
}
]
In this example I want to ignore the Second JSON Object of id=2 completely.
I have tried @JsonInclude(Include.NON_NULL) at fields level and class level but this only ignores the fields and keeps the Object.