Java Rest - send parametrized List using GET method
===

I am trying to send a List<User> by GET method.

Here is my Server side: 

    	
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public List<User> getUsers(){
		return managment.getUsers();
	}

And my client side: 

        public static void getUsers(){
        try {
            ClientConfig clientConfig = new DefaultClientConfig();
            clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
            Client client = Client.create(clientConfig);

           
           
           
            WebResource webResource = client
                    .resource("http://localhost:8080/Serwer07/user");

            ClientResponse response = webResource.accept("application/json")
                    .get(ClientResponse.class);

            if (response.getStatus() != 200) {
                throw new RuntimeException("Failed : HTTP error code : "
                        + response.getStatus());
            }

           List users = response.getEntity(List.class);          
           User user = (User) users.get(0);  //cannot cast
            e.printStackTrace();
        }
    }
I have problem with cast from Java Object to User. How can I send this List ? 

Thanks in advance.
