UnmarshalJSON implements json.Unmarshaler. This func is purely implemented for consistency. In practice, you probably want to unmarshal into an *Error instead of a *Definition.
(data []byte)
| 47 | // This func is purely implemented for consistency. In practice, |
| 48 | // you probably want to unmarshal into an *Error instead of a *Definition. |
| 49 | func (d *Definition) UnmarshalJSON(data []byte) error { |
| 50 | e := &Error{Definition: &Definition{}} |
| 51 | if err := e.UnmarshalJSON(data); err != nil { |
| 52 | return err |
| 53 | } |
| 54 | *d = *e.Definition |
| 55 | return nil |
| 56 | } |
| 57 | |
| 58 | // UnmarshalJSON implements json.Unmarshaler. |
| 59 | func (e *Error) UnmarshalJSON(data []byte) error { |
nothing calls this directly
no test coverage detected