Flaviu
Flaviu

Reputation: 1039

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

I created a schema containing arrays of unions and I was able to generate C++ source for this schema. As I understand JSON data based on the FBS schema can be converted into binary data to be used as input for C++ application. Thus I wanted generating a binary file from a JSON file. I created a JSON file trying to follow the schema but the conversion failed with

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

using

flatc -b schema.fbs data.json

How could the binary file be created from JSON file?

Upvotes: 2

Views: 711

Answers (1)

Aardappel
Aardappel

Reputation: 6074

As stated, this feature has been implemented only for the C++ generator (yes, JSON and binary count as "programming language" in the way flatc organizes things).

Upvotes: 1

Related Questions