code: func (tx *Transaction) UnmarshalJSON(data []byte) error {
  	type jsontx struct {
  		BlockHeight    uint32          `json:"blockheight,omitempty"`
  		FeesPaid       uint64          `json:"feespaid,omitempty"`
  		FeesRequired   uint64          `json:"feesrequired,omitempty"`
  		IsSigned       bool            `json:"signed"`
  		Name           string          `json:"name,omitempty"`
  		Timestamp      int64           `json:"timestamp"`
  		TotalECOutputs uint64          `json:"totalecoutputs"`
  		TotalInputs    uint64          `json:"totalinputs"`
  		TotalOutputs   uint64          `json:"totaloutputs"`
  		Inputs         []*TransAddress `json:"inputs"`
  		Outputs        []*TransAddress `json:"outputs"`
  		ECOutputs      []*TransAddress `json:"ecoutputs"`
  		TxID           string          `json:"txid,omitempty"`
  	}
  	tmp := new(jsontx)
  
  	if err := json.Unmarshal(data, tmp); err != nil {
  		return err
  	}
  
  	tx.BlockHeight = tmp.BlockHeight
  	tx.FeesPaid = tmp.FeesPaid
  	tx.FeesRequired = tmp.FeesRequired
  	tx.IsSigned = tmp.IsSigned
  	tx.Name = tmp.Name
  	tx.Timestamp = time.Unix(tmp.Timestamp, 0)
  	tx.TotalECOutputs = tmp.TotalECOutputs
  	tx.TotalInputs = tmp.TotalInputs
  	tx.TotalOutputs = tmp.TotalOutputs
  	tx.Inputs = tmp.Inputs
  	tx.Outputs = tmp.Outputs
  	tx.ECOutputs = tmp.ECOutputs
  	tx.TxID = tmp.TxID
  
  	return nil
  }
docs: // UnmarshalJSON converts the JSON Transaction back into a Transaction