Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jsonpb to emit zero values for Map, Slice, Ptr when EmitDefaults=… #296

Closed

Conversation

AkihiroSuda
Copy link

…true

When jsonpb.Marshaler.EmitDefaults is set to true, marshal zero values
of the following types accordingly:
Map to {}
Slice to []
Ptr to null

Cherry-pick Eric Wang's commit: golang/protobuf@7a211bc

Signed-off-by: Akihiro Suda [email protected]

…true

When jsonpb.Marshaler.EmitDefaults is set to true, marshal zero values
of the following types accordingly:
Map to {}
Slice to []
Ptr to null

Cherry-pick Eric Wang's commit: golang/protobuf@7a211bc

Signed-off-by: Akihiro Suda <[email protected]>
AkihiroSuda referenced this pull request in golang/protobuf May 25, 2017
…true

When jsonpb.Marshaler.EmitDefaults is set to true, marshal zero values of the 
following types accordingly:
Map to {}
Slice to []
Ptr to null
@awalterschulze
Copy link
Member

Thanks for your enthusiasm.
I prefer to merge changes from golang/protobuf in order, when I can.
golang/protobuf is making a lot of changes now all regarding jsonpb, I am impressed.
I would like to see it settle first though.
I will take this pull request as a little push, that I shouldn't wait too long, before merging their new changes.
I hope you understand.

@awalterschulze
Copy link
Member

Just merged.

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