forked from TrueCloudLab/frostfs-api-go
[#178] v2: Print default values in JSON
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
2aa40b0dd3
commit
c8f46f7d97
3 changed files with 5 additions and 5 deletions
|
@ -12,7 +12,7 @@ func ContainerToJSON(c *Container) (data []byte) {
|
|||
|
||||
msg := ContainerToGRPCMessage(c)
|
||||
|
||||
data, err := protojson.Marshal(msg)
|
||||
data, err := protojson.MarshalOptions{EmitUnpopulated: true}.Marshal(msg)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue