mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 03:01:42 +00:00
Support json encode/decode for nil values in S structs
This commit is contained in:
@ -49,7 +49,7 @@ func (p PubKeyS) MarshalJSON() ([]byte, error) {
|
||||
|
||||
func (p *PubKeyS) UnmarshalJSON(data []byte) (err error) {
|
||||
parsed, err := pubKeyMapper.FromJSON(data)
|
||||
if err == nil {
|
||||
if err == nil && parsed != nil {
|
||||
p.PubKey = parsed.(PubKey)
|
||||
}
|
||||
return
|
||||
|
Reference in New Issue
Block a user