mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-23 17:51:39 +00:00
Support json encode/decode for nil values in S structs
This commit is contained in:
@ -45,7 +45,7 @@ func (p SignatureS) MarshalJSON() ([]byte, error) {
|
||||
|
||||
func (p *SignatureS) UnmarshalJSON(data []byte) (err error) {
|
||||
parsed, err := sigMapper.FromJSON(data)
|
||||
if err == nil {
|
||||
if err == nil && parsed != nil {
|
||||
p.Signature = parsed.(Signature)
|
||||
}
|
||||
return
|
||||
|
Reference in New Issue
Block a user