I have a requirement, where in i need to read JSON request that is coming in as part of the request and also convert it to POJO at the same time. I was able to convert it to POJ
One posibility is to use a ContainerRequestFilter that's called before your method is invoked:
public class MyRequestFilter
implements ContainerRequestFilter {
@Override
public ContainerRequest filter(ContainerRequest req) {
// ... get the JSON payload here
return req;
}
}