Skip to content

Conversation

mingyuchi
Copy link

@mingyuchi mingyuchi commented Dec 5, 2022

Omitting zeros on singular fields only make sense if it's not in oneof
For example, omitting zero on the following oneof will make it ambiguous

message IntOrString {
  oneof int_or_string {
    int32 int = 1;
    string str = 2;
  }
}

if either int or str is zero, both of the fields will be missing.
Now it's not possible to know which field was originally filled

@SeongMinPark-devsisters

@stepancheg Hello, what do you think of this pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants