JSON is just a textual representation of JS objects, so the only limit is the amount of memory that supports it.
For real Javascript arrays, this depends on the software implementation, but by specification:
http://www.ecma-international.org/ecma-262/5.1/#sec-15.4
Each Array object has a length property, whose value is always equal to a non-negative integer less than 2 ^ 32
, (2 ^ 32) -1 4294967295, .
try {
new Array(4294967295);
} catch(e){
alert("Should be fine and not see this");
}
try {
new Array(4294967296);
} catch(e){
alert(e.name);
}
Hide result