title: How to render special XML/JSON Flavours with Playframework
body: <p>According to <a href="https://github.com/jamesward/play2torial/blob/master/JAVA.md#get-tasks-as-json" rel="nofollow">James Wards Play Tutorial</a> it's very easy to get a JSON out of your model. Also with XML this should be quite simple.</p>
  
  <p>But most of the time, I have the requirement to build not just an plain XML or JSON Endpoint, but furthermore to deliver special flavours of those. In my case this is <a href="http://geojson.org/" rel="nofollow">GeoJSON</a> or <a href="http://en.wikipedia.org/wiki/Topojson" rel="nofollow">TopoJSON</a>. But also in XML, it could be a simple RSS or ATOM Feed you have to deliver out of your model. Also building a XML fitting to a very nasty XSD schema is still a case sometimes.</p>
  
  <p>What options do you have in play to perform this, or which one of the following would you recommend?:</p>
  
  <ol>
  <li>In case of GeoJSON/TopoJSON: Activate JSON as a template format, and create JSON Templates</li>
  <li>In case of ATOM/RSS: Just use an XML Template</li>
  <li>Some way to modify the JSON response coming from <code>toJson(tasks)</code>?</li>
  <li>Use of a fancy library which does all that out of the box, and everyone knows about it, except me?</li>
  </ol>