mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-24 10:11:48 +00:00
Support json encode/decode for nil values in S structs
This commit is contained in:
@ -47,7 +47,7 @@ func (p PrivKeyS) MarshalJSON() ([]byte, error) {
|
||||
|
||||
func (p *PrivKeyS) UnmarshalJSON(data []byte) (err error) {
|
||||
parsed, err := privKeyMapper.FromJSON(data)
|
||||
if err == nil {
|
||||
if err == nil && parsed != nil {
|
||||
p.PrivKey = parsed.(PrivKey)
|
||||
}
|
||||
return
|
||||
|
Reference in New Issue
Block a user