title: What are the relative merits of CSV, JSON and XML for a REST API?
body: <p>We're currently planning a new <code>API</code> for an application and debating the various data formats we should use for interchange. There's a fairly intense discussion going on about the relative merits of <code>CSV</code>, <code>JSON</code> and <code>XML</code>.</p>
  
  <p>Basically, the crux of the argument is whether we should support <code>CSV</code> at all because of the lack of recursion (<strong><em>i.e. having a document which has <code>multiple authors</code> and <code>multiple references</code> would require <code>multiple API calls</code> to obtain all the <code>information</code></em></strong>).</p>
  
  <p>In the experiences you may have had when working with information from <code>Web APIs</code> and things we can do to make the lives easier for the developers working with our <code>API</code>.</p>
  
  <hr>
  
  <p><strong>Our decision:</strong></p>
  
  <blockquote>
    <p>We've decided to provide <code>XML</code> and <code>JSON</code> due to the difficulty in recursion in <code>CSV</code> needing multiple calls for a single logical operation. <code>JSON</code> doesn't have a parser in <code>Qt</code> and <code>Protocol Buffers</code> doesn't seem to have a <code>non-alpha PHP</code> implementation so they are out for the moment too but will probably be supported eventually.</p>
  </blockquote>