I have a servlet that, passed on query params, gets a list of objects from the DAO, turns the list into JSON, and sends it back in the response. Every list is made of object
Why don't just use
private String getListAsJson(List list) { ... }
?