-
-
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
Matrix output #1550
Labels
Comments
Please have a look at https://github.com/nlohmann/json#arbitrary-types-conversions. |
I cannot reproduce the error. The following program #include "json.hpp"
#include <iostream>
using json = nlohmann::json;
int main(int argc, char *argv[])
{
constexpr std::size_t TASK_count = 3;
int intensity_between_TASK[TASK_count][TASK_count] = {{1,2,3}, {4,5,6}, {7,8,9}};
json j;
j["intensity_between_TASK"] = intensity_between_TASK;
std::cout << j << std::endl;
} works with output {"intensity_between_TASK":[[1,2,3],[4,5,6],[7,8,9]]} |
@AntonPolevoi Do you need further assistance on this issue? |
It's okay. Thank you for help!
пятница, 5 апреля 2019 г., 13:02 +0300 от [email protected] <[email protected]>:
…@AntonPolevoi Do you need further assistance on this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub , or mute the thread .
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, nlohmann. How can I add matrix type to json file?
So, I did this :
And it doesn't work, it just prints this report:
The text was updated successfully, but these errors were encountered: