We are solving the problem by providing some default value with flatbuffer format, so we need to generate flatbuffers:String, flatbuffers:vector<>. The question is what is the best way to create those flatbuffer object in memory and others can read it.
I tried:
int invs[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
auto vs = builder.CreateVector(invs, 10);
builder.Finish(vs);
// we will return p to users, so they can read like flatbuffer.
auto p =
flatbuffers::GetRoot<std::vector<int>>(builder.GetBufferPointer());
but looks like it does not work. any suggestion?