This question's answer (Convert JSON many objects to single JSON using Jackson) explains how to flatten JSON using Jackson
But my json is like this
{
"field1":"value1",
"field2":"value2",
"field3": {
"type":{
"f1":"v1",
"f2":"v2"
}
}
}
I need something like this
{
"field1":"value1",
"field2":"value2",
"field3": {
"f1":"v1",
"f2":"v2"
}
}
so that field3.type
is put directly into field3
and then deserialize to Json object
I need steps to do this just using jackson annotations and not by unpacking the nested object.