Search code examples
c++flatbuffers

Getting type of serialized flatbuffer


I am looking for a way to tell what kind of object is in serialized form. The reason is, that I want to use object API on some of the objects, and standard flatbuffers on other. Is there any way to do it without creating another base object for both situations?


Solution

  • You can use the file_identifier functionality in the schema, and then calls in the API for testing the presence of that identifier.