MCPcopy Create free account
hub / github.com/SermoDigital/jose / UnmarshalJSON

Method UnmarshalJSON

header.go:110–117  ·  view source on GitHub ↗

UnmarshalJSON implements json.Unmarshaler for Protected.

(b []byte)

Source from the content-addressed store, hash-verified

108
109// UnmarshalJSON implements json.Unmarshaler for Protected.
110func (p *Protected) UnmarshalJSON(b []byte) error {
111 var h Header
112 if err := h.UnmarshalJSON(b); err != nil {
113 return err
114 }
115 *p = Protected(h)
116 return nil
117}
118
119var (
120 _ json.Marshaler = (Protected)(nil)

Callers 1

parseCompactFunction · 0.95

Calls 2

UnmarshalJSONMethod · 0.95
ProtectedTypeAlias · 0.85

Tested by

no test coverage detected