I have json post data with below template
{
"themeId" : JSONString,
"themeName" : JSONString,
"tables" : [{
"tableName" : JSONString,
"records" : [{
"recordVersion" : JSONString,
"tableItems" : []
}]
}]
}
and on Java side I have REST API like this:
@POST
@Path("/{themeId}")
@Consumes({MediaType.APPLICATION_JSON})
public Response postTheme( @PathParam("themeId") String themeId, ThemeDictionary dictionary) throws InterruptedException {
//code to handle
}
It worked fine when post data is less than 2 MB but how to handle data size bigger than 2 MB.
Questions
1) Should I go with pagination.
2) If I split json into half then each half won't be valid json. So, should I accept strings and concatnate on server side?
3) Are there any good examples to handle this scenario
4) Looking for an approach that can handle json data of size less than or greater than 2 MB