[#178] v2: Print default values in JSON

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-10-20 17:57:56 +03:00 committed by Alex Vanin
parent 2aa40b0dd3
commit c8f46f7d97
3 changed files with 5 additions and 5 deletions

View file

@ -12,7 +12,7 @@ func NodeInfoToJSON(n *NodeInfo) (data []byte) {
msg := NodeInfoToGRPCMessage(n)
data, err := protojson.Marshal(msg)
data, err := protojson.MarshalOptions{EmitUnpopulated: true}.Marshal(msg)
if err != nil {
return nil
}