Which do you prefer? (name
key is object's unique identifier)
[
{
"name": "bob",
"foo": "bar"
},
{
"name": "alice",
"foo": "baz"
}
]
{
"bob": { "foo": "bar" },
"alice": { "foo": "bar" }
}
I prefer the bottom style. Easier to grok.
I prefer the first style. It seems (slightly) easier to turn into Objective-C objects where even the unique identifier is really just going to be another property of the object.