Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding: Add EmitDefaultValues option
Introduce the EmitDefaultValues in addition to the existing EmitUnpopulated option. EmitDefaultValues is added to emit json messages more compatible with the `always_print_primitive_fields` option of the cpp protobuf library. EmitUnpopulated overrides EmitDefaultValues since the former generates a strict superset of the latter. See descussion: golang/protobuf#1536 Change-Id: Ib29b69d630fa3e8d8fdeb0de43b5683f30152151 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/521215 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Cassondra Foesch <cfoesch@gmail.com> Reviewed-by: Lasse Folger <lassefolger@google.com>
- Loading branch information
Showing
2 changed files
with
248 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters