-
Step 1:
- Define your schema data
- View syntax and structure here link
-
Step 2:
- Copy flatbuffers package into your project
-
Step 3:
- Generate model from your schema
- Format:
flatc -o path/to/your/source/set --kotlin your_schema.fbs
- Usage: compiler syntax here link
- After your command, flatbuffers will generate code model from your schema into your defined packaged
That's it for integrating with flatbuffers. Now I generate a binary from mock json and schema, and demonstrate parse it into project. Syntax generate binary
flatc -b path/to/schema path/to/json/