How to remove empty object from a json string?

8 views
Skip to first unread message

vimal c

unread,
May 13, 2019, 6:12:19 PM5/13/19
to jackson-user
Hello All,
For example, I have a json string in the below format.
Input:
{
"aName": "aValue",
"bName": "bValue",
"cName": {}
}
I would like to get the json in the below format as output,
{
"aName": "aValue",
"bName": "bValue"
}

the input can be deserialized into a POJO, but that POJO is non-modifiable. 

Is there any way in jackson library to achieve it?
Reply all
Reply to author
Forward
0 new messages