Skip to content

check which fields are filled out and which aren't in C++/Java #3777

@ahundt

Description

@ahundt

I've got a bunch of optional fields, and I want to check when they aren't provided. protobuf optional members have a bool has_<field>() function for the optional elements. It seems flatbuffers instead goes straight to the defaults? Is there any way to determine if things have been written at all vs when it is a default?

The reason for this is I'm sending messages where I only want to send diffs rather than full updates of the whole message when only one field has changed.

Additionally, is it possible to update fields in a buffer that has already been finished, or does it need to be reconstructed from scratch each time?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions