How I can serialize/flatten the following C++ structure into byte array or anything else without using any external library.
struct node
{
string splitOn;
string label;
bool isLeaf;
vector<string> childrenValues;
vector<node*> children;
};