You are viewing a single comment's thread from:

RE: Everyone who's ever worked with JSON, check this out...

in #steem8 years ago (edited)

Arrays always make sense if there's even a chance their might be more than one in the future.

Classic example: an email property field on a contact. Most systems assume there will only ever be one email per contact. Later on if they want to make a change and allow for multiple emails, it breaks everything. If, on the other hand, they start with an array, people can just hard code "get me the first entry". If they later add more, those old clients still work as always while new clients can do something more intelligent. That's just one example. JQuery has used arrays for everything and it really simplifies things. It's all a matter of perspective. To call a design preference an error is a bit dogmatic. I'm glad to see some of the comments here explain possible future evolutions of how these arrays may be used.

Sort:  

Mostly, I'm concerned about unneeded complexity. That's the biggest thing here. But.... yes, you could call me quite dogmatic about that, and you'd be totally right.

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.029
BTC 63702.19
ETH 2490.35
USDT 1.00
SBD 2.67