FlatBuffers:不支持的联合向量将 JSON 文件转换为二进制文件时出错

FlatBuffers: Unsupported vectors of unions error converting JSON file to binary file

我创建了一个包含联合数组的模式,并且能够为该模式生成 C++ 源代码。据我了解 JSON 基于 FBS 模式的数据可以转换为二进制数据,用作 C++ 应用程序的输入。因此我想从 JSON 文件生成一个二进制文件。我创建了一个 JSON 文件试图遵循模式,但转换失败

error: Vectors of unions are not yet supported in all the specified programming languages.

使用

flatc -b schema.fbs data.json

如何从 JSON 文件创建二进制文件?

如前所述,此功能仅针对 C++ 生成器实现(是的,JSON 和二进制计数为 "programming language" flatc 组织事物的方式)。