Skip to content

Adding a field with a default value #777

@kirill09

Description

@kirill09

Hi. When adding a test field with a default value (false). Binary view this field is added.
This behavior is different from the behavior in java.
https://developers.google.com/protocol-buffers/docs/proto3#default
Example:
{"test": null}
dart
[186, 6, 0]
java
[-70, 6, 0]
That's right, expected result.

{"test": true}
dart
[186, 6, 2, 40, 1]
java
[-70, 6, 2, 40, 1]
That's right, expected result.

{"test": false}
dart
[186, 6, 2, 40, 0]
java
[-70, 6, 0]
in java the correct result in dart is not

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions