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
Hi,
I'm using the library to read a kind of book database. The bug occurs when I try to "parse" all the records.
Reproduction steps
When I do a for statement on the DB get through a method it doesn't seems to get it properly. However when I declare a variable (auto type) and call it in the for statement it works as expected.
Expected vs. actual results
Trying to parse all id :
It gives me this when I declare a variable :
$ SEARCH aze
0
1
2
3
4
5
6
7
8
And gives me nothing when I put the getter in the for statement.
Minimal code example
auto db_json = this->db.getRawDatabase().at("records");
for (auto r : db_json) {
cout << r.at("id") << endl;
}
Thanks it works just fine with this change.
I'm actually a student in electronics and I use this lib for a school project in order to learn cpp ... I was pretty sure it was related to my code instead of the lib :)
Description
Hi,
I'm using the library to read a kind of book database. The bug occurs when I try to "parse" all the records.
Reproduction steps
When I do a for statement on the DB get through a method it doesn't seems to get it properly. However when I declare a variable (auto type) and call it in the for statement it works as expected.
Expected vs. actual results
Trying to parse all id :
It gives me this when I declare a variable :
And gives me nothing when I put the getter in the for statement.
Minimal code example
Output :
0
1
2
3
...
with getRawDatabase() :
However this output nothing :
Compiler and operating system
MacOS X 12.3.1 - Apple Clang 13.1.6
Library version
latest
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: