commit | 984e528fd1530a02bdcc81bebab38ec12ef02c1f | [log] [tgz] |
---|---|---|
author | Herbie Ong <herbie@google.com> | Fri Sep 06 00:29:48 2019 -0700 |
committer | Herbie Ong <herbie@google.com> | Fri Sep 06 21:15:05 2019 +0000 |
tree | fa1b663a579175b133ad61bdebfedfd804e0f7d6 | |
parent | 3924625c77af1a1b2e7d9212a21407d3bbf19e08 [diff] |
encoding/protojson: add MarshalOptions.EmitUnpopulated Add option to marshal out all fields including unset ones except for unset oneof fields and extension fields. This is to make V2 compatible with V1's EmitDefaults option. Change-Id: Ifa7bae48e82740b623c74f936bcbe9e66b11344a Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/193759 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.
This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.
List of relevant design documents:
We appreciate community contributions. See CONTRIBUTING.md.
Issues regarding the new API can be filed at github.com/golang/protobuf. Please use a APIv2:
prefix in the title to make it clear that the issue is regarding the new API work.