Testing this, Visual C++ 2010:
Json::Value value; Json::Reader reader; const string t = "{ \"PI\": 3.14159265 }"; reader.parse(t, value, false); cout << value["PI"] << endl;
Result:
3.000000000000
I solved by replacing this code:
// json_reader.cpp bool Reader::decodeDouble( Token &token ) { const std::string s = std::string(token.start_, token.end_); std::istringstream stm(s); double value; if ( !(stm >> value) ) { return addError( "'" + s + "' is not a number.", token ); } currentValue() = value; return true; }
Solution to the problem without changing code:
setlocale(LC_NUMERIC, "C");
Русская специфика :)
Log in to post a comment.
Testing this, Visual C++ 2010:
Result:
I solved by replacing this code:
Solution to the problem without changing code:
Русская специфика :)