Lines Matching full:unmarshal
24 // Unmarshal parses the JSON-encoded data and stores the result
27 // Unmarshal uses the inverse of the encodings that
31 // To unmarshal JSON into a pointer, Unmarshal first handles the case of
32 // the JSON being the JSON literal null. In that case, Unmarshal sets
33 // the pointer to nil. Otherwise, Unmarshal unmarshals the JSON into
34 // the value pointed at by the pointer. If the pointer is nil, Unmarshal
37 // To unmarshal JSON into a struct, Unmarshal matches incoming object
41 // To unmarshal JSON into an interface value,
42 // Unmarshal stores one of these in the interface value:
51 // To unmarshal a JSON array into a slice, Unmarshal resets the slice to nil
54 // To unmarshal a JSON object into a map, Unmarshal replaces the map
59 // or if a JSON number overflows the target type, Unmarshal
61 // If no more serious errors are encountered, Unmarshal returns
74 func Unmarshal(data []byte, v interface{}) error {
85 return d.unmarshal(v)
89 // that can unmarshal a JSON description of themselves.
106 return "json: cannot unmarshal " + e.Value + " into Go value of type " + e.Type.String()
119 return "json: cannot unmarshal object key " + strconv.Quote(e.Key) + " into unexported field " + e.Field.Name + " of type " + e.Type.String()
122 // An InvalidUnmarshalError describes an invalid argument passed to Unmarshal.
123 // (The argument to Unmarshal must be a non-nil pointer.)
130 return "json: Unmarshal(nil)"
134 return "json: Unmarshal(non-pointer " + e.Type.String() + ")"
136 return "json: Unmarshal(nil " + e.Type.String() + ")"
139 func (d *decodeState) unmarshal(v interface{}) (err error) {
205 // for reporting at the end of the unmarshal.
610 d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", subv.Type()))
673 d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
688 d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
697 d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
723 d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
741 d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
774 d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
787 d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))