mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-24 21:26:09 +00:00
Support for required fields.
Change-Id: I560c7ca11b3d665eecafb528f3737b7e139ca9b0 Tested: on Linux and Windows.
This commit is contained in:
@@ -184,10 +184,11 @@ struct Definition {
|
||||
};
|
||||
|
||||
struct FieldDef : public Definition {
|
||||
FieldDef() : deprecated(false), padding(0), used(false) {}
|
||||
FieldDef() : deprecated(false), required(false), padding(0), used(false) {}
|
||||
|
||||
Value value;
|
||||
bool deprecated;
|
||||
bool required;
|
||||
size_t padding; // Bytes to always pad after this field.
|
||||
bool used; // Used during JSON parsing to check for repeated fields.
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user