I am building a REST API with a payload that has a property called jsonContent, which holds any valid json.
{
"name":"foo",
"jsonContent":{ "abc":"My content"}
}
On the server side I want to map the it to a generic java object ,and eventually save the whole object to mongodb
private String name;
private ?????? jsonContent
I am using jackson for mapping json to java. How do I declare my java object so any json content can be used.