For list API, such as Users
, I find that there are two common formats. Arrays:
// flat array
[
{
"login": "octocat",
"id": 1
...
},
...
]
GitHub, Heroku and Twitter use this format
VS Objects:
{
"results": [
{
"login": "octocat",
"id": 1
...
},
...
]
}
Parse and Slack and instagram use this format.
Which one is better? How to compare these two formats?