title: What's the best way to expose this data via JSON/Web Service?
body: <p>I'm creating a type of reservations system and want to display the data to users with a format similar to this:</p>
  
  <pre><code>                          Hours
             ID  0   1   2   3   4   5   6   7   8   9   .   .
  ------------------------------------------------------------
  03/09/2015 ID1 ----++++++++++++++++++++++++++++++++++-------
             ID2 -----------++++++++++++----------------------
             ID3 ----+++++++++++-----------------+++++++++++++
  03/09/2015 ID1 ----++++++++++++++++++++++++++++++++++-------
             ID2 -----------++++++++++++----------------------
             ID3 ----+++++++++++-----------------+++++++++++++
  </code></pre>
  
  <p>I also control the web service which exposes this data so I'm trying to think of the best way to do this (I'm going to consume this web service with D3.js)</p>
  
  <p>I could expose the data in a very raw way with a list of the plot points:</p>
  
  <pre><code>var data = [
       ["01/01/2015 00:00:00", "ID1", 0],
       ["01/01/2015 00:00:15", "ID1", 0],
      ...
  ];
  </code></pre>
  
  <p>Seems a bit wasteful, as there is a lot of duplicate data that will be transmitted.  Another option is to pack the data on the server side and serve it up as a "map of map of arrays" as such:</p>
  
  <pre><code>var data = [
      {date: "01/01/2015", value: [
          {id: "ID1", value: [0,0,0,0,1,1,1,1,1...]},
          {id: "ID2", value: [0,0,0,0,0,0,0,0,0...]},
          {id: "ID3", value: [0,0,0,0,1,1,1,1,1...]}
      },
      {date: "01/02/2015", ...
  ];
  </code></pre>
  
  <p>So you have a map, with a key of "date at midnight" and value of map, with a key of "id" and value of array which contains 96 boolean values (1 each for every 15 minute increment).  This option, however, seems to be very tightly coupled to the data table.</p>
  
  <p>This table is, for now and the foreseeable future, the only consumer of this web service so coupling it may not be so bad.  On the other hand, any change to the table will probably force us to change both the table view as well as the web service.</p>