Skip to content

Commit 4fe8239

Browse files
committed
protojson better marshal options
1 parent 0355d7d commit 4fe8239

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/allure/parameter.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ func (p *Parameter) MarshalJSON() ([]byte, error) {
190190
var value string
191191

192192
if msg, ok := p.Value.(proto.Message); ok {
193-
res, err := protojson.Marshal(msg)
193+
res, err := protojson.MarshalOptions{
194+
AllowPartial: true,
195+
EmitDefaultValues: true,
196+
EmitUnpopulated: true,
197+
}.Marshal(msg)
194198
if err != nil {
195199
return nil, fmt.Errorf("protojson marshal: %w", err)
196200
}

0 commit comments

Comments
 (0)