Hi ,
I have to write a config file from a node editor with something like this
struct Node
{
int id;
string name;
}
struct Pin
{
int id;
Node* node;
}
struct Link
{
int id;
Pin* start;
Pin* end;
}
struct Config
{
std::vector
std::vector
std::vector Links;
}
How can i serialize the topover object Config ? and deserialize ?
Thanks!
You just have to provide from_json and to_json functions for each type as mentioned in README.
Also relevant: https://github.com/nlohmann/json/issues/1648
Most helpful comment
You just have to provide
from_jsonandto_jsonfunctions for each type as mentioned in README.Also relevant: https://github.com/nlohmann/json/issues/1648