I'm trying to find a JSON implementation that can effectively handle sparse arrays. I came across the question: How to represent a sparse array in JSON? but using an object instead of an array is not what I need; I specifically require an array.
My basic expectation is that the implementation would automatically insert "undefined" values for any missing elements in the sparse array. If this is not possible, I have to write extra defensive code to manually fill in these gaps before encoding the data as JSON.