Hi,
Is there a way to get the json data in its original string format? The problem is that the following code:
auto j = json::parse("[ 0.1 ]");
auto& v = j.at(0);
stringstream ss;
ss << fixed << setprecision(50) << v.get<double>();
string str = ss.str();
produces:
"0.10000000000000000555111512312578270211815834045410"
Being able to get the original string data would fix the floating point problems and also allow handling of integer numbers larger than 64 bit.
Hi,
Is there a way to get the json data in its original string format? The problem is that the following code:
produces:
"0.10000000000000000555111512312578270211815834045410"Being able to get the original string data would fix the floating point problems and also allow handling of integer numbers larger than 64 bit.