Hi, have you tried to use MappingJacksonJsonView?
Code:
@RequestMapping("/jsontournament")
public String getJSON(Model model) {
List<TournamentContent> tournamentList = new ArrayList<TournamentContent>();
tournamentList.add(TournamentContent.generateContent("FIFA",
new Date(),"World Cup","www.fifa.com/worldcup/"));
tournamentList.add(TournamentContent.generateContent("FIFA",
new Date(),"U-20 World Cup","www.fifa.com/u20worldcup/"));
tournamentList.add(TournamentContent.generateContent("FIFA",
new Date(),"U-17 World Cup","www.fifa.com/u17worldcup/"));
tournamentList.add(TournamentContent.generateContent("FIFA",
new Date(),"Confederations Cup","www.fifa.com/confederationscup/"));
model.addAttribute("feedContent",tournamentList);
return "jsontournamenttemplate";
}
Code:
<bean id="jsontournamenttemplate"
class="org.springframework.web.servlet.view.json.MappingJacksonJsonView"/>