UnmarshalJSON puts the data into Partial.Raw.
(data []byte)
| 20 | |
| 21 | // UnmarshalJSON puts the data into Partial.Raw. |
| 22 | func (p *Partial) UnmarshalJSON(data []byte) error { |
| 23 | if p == nil { |
| 24 | return errors.New("json.Partial: UnmarshalJSON on nil pointer") |
| 25 | } |
| 26 | |
| 27 | p.Raw = make([]byte, len(data)) |
| 28 | copy(p.Raw, data) |
| 29 | return nil |
| 30 | } |
| 31 | |
| 32 | // Unmarshal unmarshals the raw data (p.Raw) into v and prepares callbacks. |
| 33 | // v must be a struct that is the type of expected arguments. |
nothing calls this directly
no outgoing calls
no test coverage detected