MCPcopy Create free account
hub / github.com/koding/kite / UnmarshalJSON

Method UnmarshalJSON

dnode/partial.go:22–30  ·  view source on GitHub ↗

UnmarshalJSON puts the data into Partial.Raw.

(data []byte)

Source from the content-addressed store, hash-verified

20
21// UnmarshalJSON puts the data into Partial.Raw.
22func (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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected