Skip to content

Commit

Permalink
runtime: make default marshaler emit default values
Browse files Browse the repository at this point in the history
Fixes #233
  • Loading branch information
johanbrandhorst committed May 22, 2020
1 parent 3ed822c commit 172e2e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/internal/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ func testResponseStrings(t *testing.T, port int) {
t.Errorf("marshaler.Unmarshal failed with %v; want success", err)
return
}
var want []string
want := []string{}
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
}
Expand Down
3 changes: 1 addition & 2 deletions runtime/marshaler_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ var (

defaultMarshaler = &JSONPb{
MarshalOptions: protojson.MarshalOptions{
// TODO(johanbrandhorst): Change this to true before v2
EmitUnpopulated: false,
EmitUnpopulated: true,
},
}
)
Expand Down

0 comments on commit 172e2e2

Please sign in to comment.