// Unmarshal sets e to the result of converting the output of Marshal back into
// a group element and then returns e.
433638
func (e *GT) Unmarshal(m []byte) (*GT, bool) {
	// Each value is a 256-bit number.
	const numBytes = 256 / 8

	if len(m) != 12*numBytes {
		return nil, false
	}

	if e.p == nil {
		e.p = newGFp12(nil)
	}

	e.p.x.x.x.SetBytes(m[0*numBytes : 1*numBytes])
	e.p.x.x.y.SetBytes(m[1*numBytes : 2*numBytes])
	e.p.x.y.x.SetBytes(m[2*numBytes : 3*numBytes])
	e.p.x.y.y.SetBytes(m[3*numBytes : 4*numBytes])
	e.p.x.z.x.SetBytes(m[4*numBytes : 5*numBytes])
	e.p.x.z.y.SetBytes(m[5*numBytes : 6*numBytes])
	e.p.y.x.x.SetBytes(m[6*numBytes : 7*numBytes])
	e.p.y.x.y.SetBytes(m[7*numBytes : 8*numBytes])
	e.p.y.y.x.SetBytes(m[8*numBytes : 9*numBytes])
	e.p.y.y.y.SetBytes(m[9*numBytes : 10*numBytes])
	e.p.y.z.x.SetBytes(m[10*numBytes : 11*numBytes])
	e.p.y.z.y.SetBytes(m[11*numBytes : 12*numBytes])

	return e, true
}
403940
func (n *AppNonce) Unmarshal(data []byte) error {
	*n = [3]byte{} // Reset the receiver
	return n.UnmarshalBinary(data)
}
722369
func Unmarshal(data []byte, v interface{}) error {
	err := json.Unmarshal(data, v)
	if err != nil {
		return err
	}

	if ImplementsPostJSONUnmarshaler(v) {
		err := v.(PostJSONUnmarshaler).PostUnmarshalJSON()
		if err != nil {
			return err
		}
	}

	return nil
}
448348
func Unmarshal(data []byte, v interface{}) (err error) {
	var value interface{}
	parser := &hjsonParser{data, 0, ' '}
	parser.resetAt()
	value, err = parser.rootValue()
	if err != nil {
		return err
	}

	rv := reflect.ValueOf(v)
	if rv.Kind() != reflect.Ptr || rv.IsNil() {
		return errors.New("non-pointer " + reflect.TypeOf(v).String())
	}
	for rv.Kind() == reflect.Ptr {
		rv = rv.Elem()
	}
	defer func() {
		if e := recover(); e != nil {
			err = fmt.Errorf("%v", e)
		}
	}()
	rv.Set(reflect.ValueOf(value))
	return err
}
1287578
func (h *HTMLElement) Unmarshal(v interface{}) error {
	return UnmarshalHTML(v, h.DOM, nil)
}
633948
func (rs *RoundStateSimple) Unmarshal(bs []byte) error {
	return cdc.UnmarshalBinaryBare(bs, rs)
}
559109
func Unmarshal(r io.Reader, pb proto.Message) error {
	return new(Unmarshaler).Unmarshal(r, pb)
}
699293
func Unmarshal(bs []byte, v interface{}) error {
	bs, err := yaml.YAMLToJSON(bs)
	if err != nil {
		return err
	}
	return UnmarshalJSON(bs, v)
}
134716
func (bm *BlockMeta) Unmarshal(bs []byte) error {
	return cdc.UnmarshalBinaryBare(bs, bm)
}
1213229
func (key *AppSKey) Unmarshal(data []byte) error {
	*key = [16]byte{} // Reset the receiver
	return key.UnmarshalBinary(data)
}
594616
func (j *GoGoJSONPb) Unmarshal(data []byte, v interface{}) error {
	return unmarshalGoGoJSONPb(data, v)
}
1193859
func (d *Data) Unmarshal(b *buffer.Buffer) error {
	data := make(Data, 0, b.Len())

	// Iterate until not enough bytes remain to parse another length value
	for b.Len() > 1 {
		// 2 bytes: length of data.
		length := int(b.Read16())

		// N bytes: actual data.
		data = append(data, b.Consume(length))
	}

	// At least one instance of class data must be present
	if len(data) == 0 {
		return io.ErrUnexpectedEOF
	}

	// If we encounter any trailing bytes, report an error
	if b.Len() != 0 {
		return io.ErrUnexpectedEOF
	}

	*d = data
	return nil
}
593649
func (j *JSONBuiltin) Unmarshal(data []byte, v interface{}) error {
	return json.Unmarshal(data, v)
}
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)
}
571740
func (sp *SerializerProto) Unmarshal(data []byte, protoData proto.Message) error {
	return proto.Unmarshal(data, protoData)
}
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)
}
249661
func (j *JSONText) Unmarshal(v interface{}) error {
	if len(*j) == 0 {
		*j = emptyJSON
	}
	return json.Unmarshal([]byte(*j), v)
}