1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-13 04:37:05 +01:00

Fixing JSON for complex numbers

This commit is contained in:
Guido Cossu
2017-05-08 21:41:39 +01:00
parent 4ec746d262
commit 8ba0494485
3 changed files with 58 additions and 19 deletions

View File

@ -214,6 +214,7 @@ int main(int argc,char **argv)
// test serializable class writing
myclass obj(1234); // non-trivial constructor
std::cout << "-- serialisable class writing to 'bother.json'..." << std::endl;
write(JW,"obj",obj);
JW.write("obj2", obj);
@ -232,11 +233,11 @@ int main(int argc,char **argv)
myclass jcopy1;
std::vector<myclass> jveccopy1;
read(RD,"obj",jcopy1);
read(RD,"objvec", jveccopy1);
std::cout << "Loaded (JSON) -----------------" << std::endl;
std::cout << jcopy1 << std::endl << jveccopy1 << std::endl;
//read(RD,"objvec", jveccopy1);
//std::cout << "Loaded (JSON) -----------------" << std::endl;
//std::cout << jcopy1 << std::endl << jveccopy1 << std::endl;
}
/*
{
// Testing the next element function
JSONReader RD("test.json");
@ -245,7 +246,7 @@ int main(int argc,char **argv)
std::string name;
read(RD,"name", name);
}
*/
}