Skip to content
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

json array: initialize with prescribed size and resize method. #1057

Closed
SylvainCorlay opened this issue Apr 17, 2018 · 3 comments
Closed

json array: initialize with prescribed size and resize method. #1057

SylvainCorlay opened this issue Apr 17, 2018 · 3 comments
Labels
solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@SylvainCorlay
Copy link

Feature Request

I would like the ability to initialize a JSON array with a prescribed size.

My use case if that I know that I will be setting all items of a JSON arrays on known length but out of order.

I could do this with an intermediate STL container but I would prefer to avoid the temporary.

@nlohmann
Copy link
Owner

@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label Apr 17, 2018
@nlohmann
Copy link
Owner

@SylvainCorlay Does this solve this issue?

@SylvainCorlay
Copy link
Author

yep, closing!

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants