Files
flatbuffers/docs/source/Compiler.md
Wouter van Oortmerssen 7fcbe723fc Added a "strict JSON" mode to the text generator and compiler
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.
2014-07-09 11:43:30 -07:00

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.