How to generate and read back a JSON for an array with more than 1 dimension?

[[0,1],[2,3]] or {“a”:[[0,1],[2,3]]} are correct JSON values
How can I use to them from an bidimensional array without exception (and btw how can catch that exception? Whatever I try then I can’t catch it)

Reading has problems, but at least you can “hack” the result to get back the array.

You might look at that as a bi-dimensional array, but it’s actually an array of arrays, something that Xojo doesn’t allow outside of using Auto or Variant. So the answer is, convert the arrays into Auto() where each element is Auto(), then generate from that.

If you read the [[0,1],[2,3]] you got an array of auto (array) as you say.

What’s odd is that you can assign it as a auto(,) parameter, even if it’s a bad idea since then you can’t rebuild the original array.

Since this is a standard structure, at least for standard types GenerateJSON should work.
the same for reading ( at least for complete matrix, I know that [[0],[1,2]] is an JSON acceptable value but not for XOJO so a normal matrix should be read otherwise rise an exception)