You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
what(): [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
To read the file I copied the example code from the README
std::ifstream ifs("my_file.json");
/*
std::stringstream ss;
ss << ifs.rdbuf();
std::cout << ss.str() << "\n";
// prints the file, so path is correct
*/
JSON json;
ifs >> json;
std::cout << json << "\n";
I also tried adding zeros in the empty arrays, but that didn't help either.
The text was updated successfully, but these errors were encountered:
I wish I could say more than that the parse error indicates that it was not possible to retrieve any byte from the input. Can you try reading the input into a string and parse from there?
I validated my JSON file with various tools online and they confirm that my JSON file has valid syntax. Yet I get a parse error
what(): [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
To read the file I copied the example code from the README
I also tried adding zeros in the empty arrays, but that didn't help either.
The text was updated successfully, but these errors were encountered: