data.go 237 B

1234567891011
  1. package blockchain
  2. import "encoding/json"
  3. type Data string
  4. // Unmarshal the result into the interface. Use it to retrieve data
  5. // set with SetValue
  6. func (d Data) Unmarshal(i interface{}) error {
  7. return json.Unmarshal([]byte(d), i)
  8. }