Forum Navigation
Multidimensional array in Json
Posted: 04/30/09 22:57:49Could anybody tell me how to save an array in Json like this, but then correct? (First time Tango user :))
int i; int[100] array; int[100][100][10] bigArray;
auto json = new Json!(char);
with (json) {
value = object (pair("i", value(i))); //ok value = object (pair("array", array(array)); //not ok value = object (pair("bigArray", array(bigAray)); // no clue :)
auto outfile = new File("data.dat");
json.print ((char[] s) {outfile.write(s);});