func (pk *PrivKey) UnmarshalJSON(b []byte) error {
	var s string

	err := json.Unmarshal(b, &s)
	if err != nil {
		return err
	}

	pkCopy, err := PrivateKeyFromString(s)
	if err != nil {
		return err
	}

	*pk = *pkCopy
	return err
}
// UnmarshalJSON unmarshals bytes into a key
UnmarshalJSON unmarshals bytes into a key
// UnmarshalJSON unmarshals bytes into a key
func (pk *PrivKey) UnmarshalJSON(b []byte) error {
	var s string
	err := json.Unmarshal(b, &s)
	if err != nil {
		return err
	}
	pkCopy, err := PrivateKeyFromString(s)
	if err != nil {
		return err
	}
	*pk = *pkCopy
	return err
}
func ( pk * PrivKey ) UnmarshalJSON ( b [ ] byte ) error { var s string err := json . Unmarshal ( b , & s ) if err != nil { return err } pkCopy , err := PrivateKeyFromString ( s ) if err != nil { return err } * pk = * pkCopy return err }
UnmarshalJSON unmarshals bytes into a key
UnmarshalJSON unmarshals bytes into a key