title: Grails: Rendering JSON using executeQuery
body: <p>I am testing out a controller and simply want to retrieve the JSON. However, I'm noticing that the controller returns data but it does not return the JSON properly with the key/value pairs. It literally only returns the data. I notice however, that if I use Incident.getAll(), it returns the JSON properly. For example, it will return [INCIDENTID: "Value"] as opposed to using executreQuery which just returns the data.</p>
  
  <p>My code:</p>
  
  <pre><code>def incident = Incident.executeQuery("select a.INCIDENTID from Incident a")
  render incident as JSON
  </code></pre>