MarshalJSON implements json.Marshaler.
()
| 36 | |
| 37 | // MarshalJSON implements json.Marshaler. |
| 38 | func (e *Error) MarshalJSON() ([]byte, error) { |
| 39 | if e == nil { |
| 40 | return []byte("null"), nil |
| 41 | } |
| 42 | return JSONCodec.Marshal(e.GRPCStatus().Proto()) |
| 43 | } |
| 44 | |
| 45 | // UnmarshalJSON implements json.Unmarshaler. |
| 46 | // |
nothing calls this directly
no test coverage detected