mirror of https://github.com/nlohmann/json.git
Fix amount of entries in the json object
After the initial j.push_back() calls there is another j.emplace_back() call that makes the size == 4 not 3.pull/2659/head
parent
176d8e261a
commit
ddbdb65834
|
@ -580,7 +580,7 @@ bool foo = j.at(2);
|
||||||
j == "[\"foo\", 42, true, 1.78]"_json; // true
|
j == "[\"foo\", 42, true, 1.78]"_json; // true
|
||||||
|
|
||||||
// other stuff
|
// other stuff
|
||||||
j.size(); // 3 entries
|
j.size(); // 4 entries
|
||||||
j.empty(); // false
|
j.empty(); // false
|
||||||
j.type(); // json::value_t::array
|
j.type(); // json::value_t::array
|
||||||
j.clear(); // the array is empty again
|
j.clear(); // the array is empty again
|
||||||
|
|
Loading…
Reference in New Issue