Unmarshal is the same as making a new decoder and using it on a bytes.Reader of the input
(input []byte, v any)
| 77 | |
| 78 | // Unmarshal is the same as making a new decoder and using it on a bytes.Reader of the input |
| 79 | func Unmarshal(input []byte, v any) (rootName string, err error) { |
| 80 | return NewDecoder(bytes.NewReader(input)).Decode(v) |
| 81 | } |
| 82 | |
| 83 | func (d *Decoder) DecodeRootCompound(v any) (rootName string, err error) { |
| 84 | val := reflect.ValueOf(v) |
no test coverage detected