-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resize(...)? #1157
Comments
The following piece of code does not compile, which leads me to the suggestion that currently, this function is not implemented: #include <iostream>
#include "json.hpp"
int main(int argc, char const *argv[]) {
nlohmann::json j;
j["array"] = nlohmann::json::array();
j["array"].resize(5);
return 0;
} Is there another efficient way to store a Thus, I would suggest implementing the two |
The library itself does not have a |
@phyz777 Does this solve your issue? |
Yepp, works fine! Thanks for linking the |
Cool! |
Hello,
is there a resize() function for arrays, analogous to the resize function of std::vector?
The text was updated successfully, but these errors were encountered: