I'm using flatbuffers to deserialize a data which contains a union struct like

```
struct ReqMsgUnion {
  ReqMsg type;
  void *value;
}

```

Schema:

```
 table Request {
        seq_no: uint = 0;                          
        msg: ReqMsg (required);
    }

```

Now I want to use memcopy() to copy 'value', but I can't get the correct size of 'value' because there are some '\0' inside (if I do not mistake).
I search on the Internet and find a method like "Add a dataLength in the schema", but I want to know whether there are other better ideas.
Thank you!