// GET a list of all decks @GET @Produces({MediaType.APPLICATION_JSON}) public String getAll() { List<Deck> deckList = deckService.getAll(); Gson gson = new Gson(); return gson.toJson(deckList); }