I'm working with REST services using Jersey for my JSON handle. I'd like to make a method which consumes a generic object. Is there a way to deserialize it without a bean class?
JSON:
{
    "id": "2",
    "name": "John"  
}
Current method (using bean class):
@Path("/loginCheck")
    @POST
    @Consumes({ MediaType.APPLICATION_JSON })
    @Produces({ MediaType.APPLICATION_JSON })
    public Object checkLoginStatus(Object a) {
      // Check login status function
    }
I was reading about something with a HashMap which may work or maybe casting my Object with an inside class into the same method.
Any Ideas? Thanks.
 
     
    