-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
I have a query regarding nlohmann::basic_json::basic_json #1174
Comments
You could try: auto j = basic_json({{"foo", "bar"}}, false); |
@nlohmann Thank you. |
Hi @nlohmann , I am doing like this:-
But the value of type_deduction is still true. |
I guess you then also need to pass a value for |
Hi @nlohmann, I got it now. Thanks for the answer. Yeah those were internal parameters. |
If you just want to enforce that an array is created, it is better to make this explicit by using this function: https://nlohmann.github.io/json/classnlohmann_1_1basic__json_aa80485befaffcadaa39965494e0b4d2e.html#aa80485befaffcadaa39965494e0b4d2e (it uses the other constructor internally) |
@sonulohani Can I close this issue? |
@nlohmann Yeah sure. Thank you very much |
Hi @nlohmann ,
While i was understanding the json code, I've got involved into a question. In this link:- https://nlohmann.github.io/json/classnlohmann_1_1basic__json_ab5dfd9a2b2663b219641cb7fe59b6da2.html#ab5dfd9a2b2663b219641cb7fe59b6da2 in the ctor "basic_json" I want to pass type_deduction as false. How can i do that.
The text was updated successfully, but these errors were encountered: