// Unmarshal unmarshals the given raw object into the given result interface.
514516
func (c *vstConnection) Unmarshal(data driver.RawObject, result interface{}) error {
	ct := driver.ContentTypeVelocypack
	if len(data) >= 2 {
		// Poor mans auto detection of json
		l := len(data)
		if (data[0] == '{' && data[l-1] == '}') || (data[0] == '[' && data[l-1] == ']') {
			ct = driver.ContentTypeJSON
		}
	}
	switch ct {
	case driver.ContentTypeJSON:
		if err := json.Unmarshal(data, result); err != nil {
			return driver.WithStack(err)
		}
	case driver.ContentTypeVelocypack:
		//panic(velocypack.Slice(data))
		if err := velocypack.Unmarshal(velocypack.Slice(data), result); err != nil {
			return driver.WithStack(err)
		}
	default:
		return driver.WithStack(fmt.Errorf("Unsupported content type %d", int(ct)))
	}
	return nil
}
1213229
func (key *AppSKey) Unmarshal(data []byte) error {
	*key = [16]byte{} // Reset the receiver
	return key.UnmarshalBinary(data)
}
1231467
func (m *Modules) Unmarshal(b []byte) error {
	r := bytes.NewBuffer(b)
	d := format.NewDecoder(r)

	m.raw = format.New()
	if err := d.Decode(m.raw); err != nil {
		return err
	}

	unmarshalSubmodules(m.raw, m.Submodules)
	return nil
}
443336
func (b *BoolOption) Unmarshal(data []byte) error {
	protoValue := &BoolValue{}
	err := proto.Unmarshal(data, protoValue)
	if err != nil {
		return err
	}
	b.Value = protoValue.Value
	return nil
}
507591
func Unmarshal(p []byte) (up u.Uptime, err error) {
	return Deserialize(p)
}
1148902
func (m *Message) Unmarshal(v interface{}) error {
	val := reflect.Indirect(reflect.ValueOf(v))
	if val.Kind() != reflect.Struct || !val.CanSet() {
		return fmt.Errorf("%v is not a pointer to a struct", reflect.TypeOf(v))
	}
	maxAttrID, err := structMaxAttrID(val)
	if err != nil {
		return err
	}
	attrs, err := parseMessage(m.nlm, maxAttrID)
	if err != nil {
		return err
	}
	return unmarshal(val, "", nil, attrs)
}
783512
func (p ProtobufImpl) Unmarshal(marshaled []byte, msg proto.Message) error {
	return errors.WithStack(proto.Unmarshal(marshaled, msg))
}
1222590
func (p *PooledUnmarshaller) Unmarshal(b []byte, obj interface{}) error {
	u := p.pool.Get().(*Unmarshaller)
	err := u.Unmarshal(b, obj)
	p.pool.Put(u)
	return err
}
568684
func Unmarshal(data []byte) (geom.T, error) {
	return Read(bytes.NewBuffer(data))
}
1149833
func Unmarshal(params *fastjson.RawMessage, dst interface{}) *Error {
	if params == nil {
		return ErrInvalidParams()
	}
	if err := fastjson.Unmarshal(*params, dst); err != nil {
		return ErrInvalidParams()
	}
	return nil
}
1102994
func (pvt *PvtDataCollections) Unmarshal(data [][]byte) error {
	for _, each := range data {
		payload := &gossip.PvtDataPayload{}
		if err := proto.Unmarshal(each, payload); err != nil {
			return err
		}
		pvtRWSet := &rwset.TxPvtReadWriteSet{}
		if err := proto.Unmarshal(payload.Payload, pvtRWSet); err != nil {
			return err
		}
		*pvt = append(*pvt, &ledger.TxPvtData{
			SeqInBlock: payload.TxSeqInBlock,
			WriteSet:   pvtRWSet,
		})
	}

	return nil
}
489524
func (u UnmarshalerFunc) Unmarshal(data []byte, v interface{}) error {
	return u(data, v)
}
68156
func (s *Story) Unmarshal(ss string) error {
	return json.Unmarshal([]byte(ss), s)
}
1246081
func (*ProtoMarshaller) Unmarshal(data []byte, value interface{}) error {
	message, ok := value.(proto.Message)
	if !ok {
		return errors.New("unable to unmarshal non proto field")
	}
	return proto.Unmarshal(data, message)
}
351789
func (r *Redis) Unmarshal(key string, object interface{}) error {
	value, err := r.Get(key)
	if err == nil {
		err = json.Unmarshal([]byte(value), object)
	}
	return err
}
198317
func (n *Node) Unmarshal(data []byte) error {
	newNode := Node{}
	if err := json.Unmarshal(data, &newNode); err != nil {
		return err
	}

	*n = newNode

	return nil
}
559109
func Unmarshal(r io.Reader, pb proto.Message) error {
	return new(Unmarshaler).Unmarshal(r, pb)
}