title: Play! Framework return json response
body: <p>I`m using Play! Framework  2.0 and I'm new in this framework. How can I return just a json representation of my model in white html page?</p>
  
  <p>What I'm doing is </p>
  
  <pre><code>public static void messagesJSON(){  
     List&lt;Message&gt; messages = Message.all();  
     renderJSON(messages);  
  }
  </code></pre>
  
  <p>But I get Error : Cannot use a method returning Unit as an Handler </p>