How to filter response of a JAX-RS service?
===

I got the following value object:

    @XmlRootElement
    public class Movie{
      public String name;
      public Date releaseDate;
      public List<Actors> actors;
    }

and i got the following service

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public List<Movie> moviesByYear(int year){
    //return all movies by year
    }

The movies are searched in the database by some ORM framework. My question is: I want to filter the response, to not return the actors list (because this field is not relevant, and makes the response larger). Of course I can

    for(Movie movie: movies){
      movie.actors = null;
    }

but this will escalate quickly if I want to remove multiple fields.