3 ms·
> This is perfectly reasonable because valid JSON can also be an array Are arrays (and primitives which can be boxed) not considered objects in every OO langua
by nailer 12y ago
> This is perfectly reasonable because valid JSON can also be an array
Are arrays (and primitives which can be boxed) not considered objects in every OO language ever?
Agreed re: usls ctrctns. That's the other extreme. One wants to convey the required meaning in the minimum amount possible - no more, no less.
Edit: thinking about it, you probably mean that the top level object is a hashtable, since ObjC is strongly typed. If I was going to do that I'd rather check the whole structure (rather than just the top) with an interface.
- pavlov 12y agoYeah, that's what I meant. Because JSON is based on JavaScript, its data types are often called by their JS names: a name/value pair collection is an "object" and an ordered list is an "array"... But of course an array is an object as well, so there's ample room for confusion.