func (pow *ProofOfWork) UnmarshalJSON(b []byte) error {
	var s string

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

	powCopy, err := NewFromString(s)
	if err != nil {
		return err
	}

	// This seems wrong, but copy() doesn't work?
	pow.Bits = powCopy.Bits
	pow.Data = powCopy.Data
	pow.Proof = powCopy.Proof

	return err
}
// UnmarshalJSON unmarshals bytes into a pow
UnmarshalJSON unmarshals bytes into a pow
// UnmarshalJSON unmarshals bytes into a pow
func (pow *ProofOfWork) UnmarshalJSON(b []byte) error {
	var s string
	err := json.Unmarshal(b, &s)
	if err != nil {
		return err
	}
	powCopy, err := NewFromString(s)
	if err != nil {
		return err
	}
	pow.Bits = powCopy.Bits
	pow.Data = powCopy.Data
	pow.Proof = powCopy.Proof
	return err
}
func ( pow * ProofOfWork ) UnmarshalJSON ( b [ ] byte ) error { var s string err := json . Unmarshal ( b , & s ) if err != nil { return err } powCopy , err := NewFromString ( s ) if err != nil { return err } pow . Bits = powCopy . Bits pow . Data = powCopy . Data pow . Proof = powCopy . Proof return err }
UnmarshalJSON unmarshals bytes into a pow
UnmarshalJSON unmarshals bytes into a pow
// This seems wrong, but copy() doesn't work?