title: How to only send certain properties of a class as json
body: <p>I have a simple action such as this:</p>
  
  <pre><code>def showSomething() {
     render Color.get(params.id) as JSON
  }
  </code></pre>
  
  <p>This will render all the properties in the Color class as JSON. However, what if I only want to render two properties, say, <code>colorName and shade</code>?</p>