title: What are the advantages of returning JSON response in Spring REST Using MappingJackson2JsonView Support over @ResponseBody Annotation?
body: <p>I am going through this <a href="http://howtodoinjava.com/2015/02/20/spring-rest-hello-world-json-example/#" rel="nofollow">tutorial</a> and found we can return JSON response in Spring REST Using <code>MappingJackson2JsonView</code> Support over <code>@ResponseBody</code> Annotation.</p>
  
  <p>Apparently Using <code>@ResponseBody</code> Annotation is very simple and easy to implement where as Using <code>MappingJackson2JsonView</code> Support bit complex. Any way this is my personal opinion, but I want to know what are the <strong>advantages of returning JSON response in Spring REST Using MappingJackson2JsonView Support over @ResponseBody Annotation</strong>, if there is any? Can someone explain me which one is better between them and why? <strong>When to use MappingJackson2JsonView Support and when to use @ResponseBody Annotation</strong> for returning JSON response in Spring REST?</p>