code: func (tx *Transaction) MarshalJSON() ([]byte, error) {
  	tmp := &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"`
  	}{
  		BlockHeight:    tx.BlockHeight,
  		FeesPaid:       tx.FeesPaid,
  		FeesRequired:   tx.FeesRequired,
  		IsSigned:       tx.IsSigned,
  		Name:           tx.Name,
  		Timestamp:      tx.Timestamp.Unix(),
  		TotalECOutputs: tx.TotalECOutputs,
  		TotalInputs:    tx.TotalInputs,
  		TotalOutputs:   tx.TotalOutputs,
  		Inputs:         tx.Inputs,
  		Outputs:        tx.Outputs,
  		ECOutputs:      tx.ECOutputs,
  		TxID:           tx.TxID,
  	}
  
  	return json.Marshal(tmp)
  }
docs: // MarshalJSON converts the Transaction into a JSON object