mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
This will add quotes around field names, as required by the official standard. By default it will leave quotes out, as it is more readable, more compact, and is accepted by almost all JSON parsers. The -S switch to flatc turns on strict mode. As per rfc 7159. Change-Id: Ibabe9c8162c47339d00ec581d18721a2ba40c6d0 Tested: on Windows.
30 lines
1.0 KiB
Markdown
Executable File
30 lines
1.0 KiB
Markdown
Executable File
# Using the schema compiler
|
|
|
|
Usage:
|
|
|
|
flatc [ -c ] [ -j ] [ -b ] [ -t ] [ -o PATH ] [ -S ] file1 file2 ..
|
|
|
|
The files are read and parsed in order, and can contain either schemas
|
|
or data (see below). Later files can make use of definitions in earlier
|
|
files. Depending on the flags passed, additional files may
|
|
be generated for each file processed:
|
|
|
|
- `-c` : Generate a C++ header for all definitions in this file (as
|
|
`filename_generated.h`). Skips data.
|
|
|
|
- `-j` : Generate Java classes.
|
|
|
|
- `-b` : If data is contained in this file, generate a
|
|
`filename_wire.bin` containing the binary flatbuffer.
|
|
|
|
- `-t` : If data is contained in this file, generate a
|
|
`filename_wire.txt` (for debugging).
|
|
|
|
- `-o PATH` : Output all generated files to PATH (either absolute, or
|
|
relative to the current directory). If omitted, PATH will be the
|
|
current directory. PATH should end in your systems path separator,
|
|
e.g. `/` or `\`.
|
|
|
|
- `-S` : Generate strict JSON (field names are enclosed in quotes).
|
|
By default, no quotes are generated.
|