code: func (s StructLog) MarshalJSON() ([]byte, error) {
  	type StructLog struct {
  		Pc            uint64                      `json:"pc"`
  		Op            OpCode                      `json:"op"`
  		Gas           math.HexOrDecimal64         `json:"gas"`
  		GasCost       math.HexOrDecimal64         `json:"gasCost"`
  		Memory        hexutil.Bytes               `json:"memory"`
  		MemorySize    int                         `json:"memSize"`
  		Stack         []*math.HexOrDecimal256     `json:"stack"`
  		Storage       map[common.Hash]common.Hash `json:"-"`
  		Depth         int                         `json:"depth"`
  		RefundCounter uint64                      `json:"refund"`
  		Err           error                       `json:"-"`
  		OpName        string                      `json:"opName"`
  		ErrorString   string                      `json:"error"`
  	}
  	var enc StructLog
  	enc.Pc = s.Pc
  	enc.Op = s.Op
  	enc.Gas = math.HexOrDecimal64(s.Gas)
  	enc.GasCost = math.HexOrDecimal64(s.GasCost)
  	enc.Memory = s.Memory
  	enc.MemorySize = s.MemorySize
  	if s.Stack != nil {
  		enc.Stack = make([]*math.HexOrDecimal256, len(s.Stack))
  		for k, v := range s.Stack {
  			enc.Stack[k] = (*math.HexOrDecimal256)(v)
  		}
  	}
  	enc.Storage = s.Storage
  	enc.Depth = s.Depth
  	enc.RefundCounter = s.RefundCounter
  	enc.Err = s.Err
  	enc.OpName = s.OpName()
  	enc.ErrorString = s.ErrorString()
  	return json.Marshal(&enc)
  }
docs: // MarshalJSON marshals as JSON.