MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / UnmarshalJSON

Method UnmarshalJSON

pkg/errors/json.go:59–67  ·  view source on GitHub ↗

UnmarshalJSON implements json.Unmarshaler.

(data []byte)

Source from the content-addressed store, hash-verified

57
58// UnmarshalJSON implements json.Unmarshaler.
59func (e *Error) UnmarshalJSON(data []byte) error {
60 s := new(spb.Status)
61 if err := JSONCodec.Unmarshal(data, s); err != nil {
62 return err
63 }
64 errFromStatus := FromGRPCStatus(status.FromProto(s))
65 *e = *errFromStatus
66 return nil
67}

Callers 3

UnmarshalJSONMethod · 0.95
HandleCallbackMethod · 0.95
TokenMethod · 0.95

Calls 3

FromGRPCStatusFunction · 0.85
UnmarshalMethod · 0.65
FromProtoMethod · 0.45

Tested by

no test coverage detected