mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 13:53:38 +00:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user