UnmarshalJSON implements json.Unmarshaler for Protected.
(b []byte)
| 108 | |
| 109 | // UnmarshalJSON implements json.Unmarshaler for Protected. |
| 110 | func (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 | |
| 119 | var ( |
| 120 | _ json.Marshaler = (Protected)(nil) |
no test coverage detected