mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 06:05:17 +00:00
flatbuffer force-empty option (#4822)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
af6c0e6839
commit
51d9641de6
@@ -422,6 +422,10 @@ struct IDLOptions {
|
||||
// for code generation.
|
||||
unsigned long lang_to_generate;
|
||||
|
||||
// If set (default behavior), empty string and vector fields will be set to
|
||||
// nullptr to make the flatbuffer more compact.
|
||||
bool set_empty_to_null;
|
||||
|
||||
IDLOptions()
|
||||
: strict_json(false),
|
||||
skip_js_exports(false),
|
||||
@@ -457,7 +461,8 @@ struct IDLOptions {
|
||||
force_defaults(false),
|
||||
lang(IDLOptions::kJava),
|
||||
mini_reflect(IDLOptions::kNone),
|
||||
lang_to_generate(0) {}
|
||||
lang_to_generate(0),
|
||||
set_empty_to_null(true) {}
|
||||
};
|
||||
|
||||
// This encapsulates where the parser is in the current source file.
|
||||
|
||||
Reference in New Issue
Block a user