ListAccounts JSON array data isn't consistently formatted (compared to ListReceivedByAccount)
JSON data structure supports lists (arrays).


http://en.wikipedia.org/wiki/JSON


In the first API command (ListAccounts) the result contents is an object which contains a string.  Inside this string is a set of data records, each of which is a key/value item.  

In the second (ListReceivedByAccount) the result contents is an array of objects, each of which holds account data.

That does appear inconsistent, where perhaps the first call should have returned an array as well.

However a rule of thumb is that existing APIs should not change.  They can be deprecated and replaced but a call is expected to behave in a consistent manner.  

The Bitcoin client is an open source project and thus an issue ticket for this inconsistency can be opened and a pull request with the source for a new API call submitted.  Whether such an issue is merged into the client depends on a number of factors, including severity of problem.