The US Census now has an API
> <i>The response for all queries is formatted as a two dimensional JSON array where the first row provides column names and subsequent rows provide data values.</i><p>Hmmm... looking at the example of this I can't help but think there has got to be a better way. This is more just a standard CSV (first row is header, all other rows are data). Using JSON for data formatted as such is kind of a waste of JSON. If you pass that example into a JSON decoder you get an extremely more difficult to use object. Am I missing something? or is this just typical "the government doesn't do tech properly" stuff?<p>EDIT: sorry, I try to be less negative but sometimes it is hard. I do applaud them for at least making the info available. I don't have a use for it but if some else does then dealing with a stupid format is better than not having data at all.<p>EDIT2: (to clarify) I was not saying the data <i>should</i> just be CSV... I'm saying it <i>is</i> and that defeats the purpose of using JSON. They should still use JSON but with their data formatted differently. Using their example, properly closed but truncated to just to first 2 records, the PHP function json_decode() turns it into this array:<p><pre><code>  array (
    0 => array (
      0 => 'P0010001',
      1 => 'NAME',
      2 => 'state',
    ),
    1 => array (
      0 => '710231',
      1 => 'Alaska',
      2 => '02',
    ),
    2 => array (
      0 => '4779736',
      1 => 'Alabama',
      2 => '01',
    ),
  )
</code></pre>
I don't find that format to be very pleasant.