Reputation: 1039
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
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