title: different packets, union - is a correct usage\verify?
body: <p>documentaion have one simple example "serialization-unserialization" with one packet. (i not found more examples)</p>
  
  <p>if i have a many structs of packet, i need use union to this? or this bad idea?</p>
  
  <p>how i need verify income packets, before use it in program?</p>
  
  <p>method Verify - all i need to validate packet? (struct is correct, fields are permissible)</p>
  
  <pre><code>include "body1.fbs";
  include "body2.fbs";
  
  union PacketBody {
     body1,
     body2
  }
  
  table Packet {
     body: PacketBody
  }
  
  root_type Packet;
  </code></pre>
  
  <pre><code>auto request = Packet::GetPacket(&amp;buf);
  auto ver = new flatbuffers::Verifier(buf, len);
  if(request-&gt;Verify(*ver) {
     //good ?
     auto body = request-&gt;body();
     auto body_type = request-&gt;body_type();
     map[body_type](body);
  } else {
     //wrong packet
  }
  </code></pre>