title: Best practice: data-centric or client-centric JSON API for small amount of clients?
body: <p>We´re developing a JSON API to deliver data to a handful of clients (namely iOS and Android Apps).</p>
  
  <p>Now, the constantly arising question is: from what point of view do we structure our JSON?</p>
  
  <h2><strong>1) 'Client-centric':</strong></h2>
  
  <p>The JSONs keys are named after the matching UI elements in the app. e.g.:</p>
  
  <pre><code>{
      "label" : "This is a headline of a news article",
      "textField" : "This is the text of a news article",
  }
  </code></pre>
  
  <p><strong>Pro:</strong></p>
  
  <p>Content of the apps can be changed without releasing new versions of the app. If you wanted to change the content of the UI label, it would look like this:</p>
  
  <pre><code>{
      "label" : "This is a short abstract of a news article"
  }
  </code></pre>
  
  <p>Also, it should be possible to have only one data model related to one view on the client side.</p>
  
  <p><strong>Contra:</strong></p>
  
  <p>Generates clutter on the server-side, as there must be the translation from data object name to UI element name</p>
  
  <hr>
  
  <h2><strong>2) 'Data-centric'</strong></h2>
  
  <p>The JSON keys are named after the data entity that delivers the data</p>
  
  <pre><code>{
      "articleHeadline" : "This is a headline of a news article",
      "articleText" : "This is the text of a news article"
  }
  </code></pre>
  
  <p><strong>Pro:</strong></p>
  
  <p>The JSON API says what it does. The key name reveals the content of the key.</p>
  
  <p><strong>Contra:</strong></p>
  
  <p>Generates clutter on the client-side, as there must be the translation
  from data object name to UI element name</p>
  
  <p>A change in content will also change the name of the JSONs keys. </p>
  
  <pre><code>{
      "articleAbstract" : "This is a short abstract of a news article"
  } 
  </code></pre>
  
  <p>This also requires a code change and deployment of all apps that use the API.</p>
  
  <hr>
  
  <h2>Which one of the two approaches do you prefer and why?</h2>