Hacker News new | ask | show | jobs
by mikegirouard 4866 days ago
The README says not to mix data types because "that's stupid" (which I don't know if I agree with); but I don't know if that answers your question.

You have an array of array, which at that level, satisfies the spec. The children individually keep types contained.

That said, I'm going to assume the intent is to not allow that.

1 comments

Would it be okay to understand arrays as integer indexed keys?

For example, wouldn't that mean something like:

  array = [ [1,2], ["a", "b"] ]
Be the same as this:

  [array]
  0 = [1,2]
  1 = ["a", "b"]