I know there is a checkField function that tells whether a field is missing but it does not distinguish between a missing field or a field set to it default value.
However if we are using reflection then it may be possible to check for nulls. e.g.
1. Call checkField on the scalar field.
2. Call checkField on default_integer or default_real inside reflection::Field table
table Field {
name:string (required, key);
type:Type (required);
id:ushort;
offset:ushort; // Offset into the vtable for tables, or into the struct.
default_integer:long = 0;
default_real:double = 0.0;
deprecated:bool = false;
required:bool = false;
key:bool = false;
}
However the issue is that default_integer and default_real both have default values :) so you can't tell if they are missing or set to their default. Can we not have default values for these fields. I think it won't be a breaking change because when we call Field->default_integer, we will still get 0 if these fields are missing or 0.0 in case of default_real.