diff options
author | Wouter van Oortmerssen <wvo@google.com> | 2015-05-27 16:42:15 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <wvo@google.com> | 2015-05-27 16:42:15 -0700 |
commit | ecf5a6a580980af8f6ef83b513011f35dddc0c2b (patch) | |
tree | 206c85dbceaca91ba3df7d308532288ee4d38e12 /docs | |
parent | 788acb08d491d8436a77efb113c3533d17a5bac2 (diff) | |
download | flatbuffers-ecf5a6a580980af8f6ef83b513011f35dddc0c2b.tar.gz |
Added --defaults-json to output fields at default value.
Normal behavior is to not output fields that happen to have
the default value, since those will be reproduced anyway
when turned into a FlatBuffer binary. This however can be problematic
when using JSON to interop with other system since they might not
know this default value. This flatc option (and also flag
to GenerateText) will force those fields to be output anyway.
Tested: on Linux.
Diffstat (limited to 'docs')
-rwxr-xr-x | docs/source/Compiler.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/source/Compiler.md b/docs/source/Compiler.md index cb0bb960..3ff89edc 100755 --- a/docs/source/Compiler.md +++ b/docs/source/Compiler.md @@ -45,6 +45,9 @@ be generated for each file processed: in quotes, no trailing commas in tables/vectors). By default, no quotes are required/generated, and trailing commas are allowed. +- `--defaults-json` : Output fields whose value is equal to the default value + when writing JSON text. + - `--no-prefix` : Don't prefix enum values in generated C++ by their enum type. |