Search code examples
httpserializationdeserializationflatbuffers

MIME type for Flatbuffers?


I've searched to find the proper MIME type for flatbuffers but I can't seem to find any. No mention of it on their documentation either.

The project page: https://github.com/google/flatbuffers


Solution

  • There is none. The correct mime type to use is application/octet-stream.

    I don't think creating one would make sense either, since a naked FlatBuffer (without knowledge of its schema) cannot be parsed (unlike JSON), it is an opaque binary file. application/flatbuffer (if it existed) is barely more useful than application/octet-stream.

    You need the schema before the file becomes readable, and I don't think mime types have a way to specify the schema name.. though I suppose flatbuffers/schema-name would be cool, if whatever standards body governs mime types would allow it :)