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 objects in list #1552

Closed
kuzmanzs opened this issue Mar 28, 2019 · 1 comment
Closed

json objects in list #1552

kuzmanzs opened this issue Mar 28, 2019 · 1 comment
Labels
kind: question solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@kuzmanzs
Copy link

Hi,

I would like to create a list from json objects.

json createJson1(){
json j;
j["type"]="text";
j["value"]="x";
return j;
}

Something like this:
json j = json::array( createJson1(), createJson2() );

@kuzmanzs kuzmanzs changed the title json inbject in list json objects in list Mar 28, 2019
@kuzmanzs
Copy link
Author

I found it.

json::array( { createJson1(), createJson2() } );

@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: question 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