// Using Marshal / Unmarshal API
973050
func marshalAPI(m myMap) error {
	b, err := gojay.Marshal(m)
	if err != nil {
		return err
	}
	log.Print(string(b))

	nM := myMap(make(map[string]string))
	err = gojay.Unmarshal(b, nM)
	if err != nil {
		return err
	}
	log.Print(nM)
	return nil
}
35361
func (*TeleportServerMarshaler) UnmarshalServer(bytes []byte, kind string, opts ...MarshalOption) (Server, error) {
	cfg, err := collectOptions(opts)
	if err != nil {
		return nil, trace.Wrap(err)
	}

	return UnmarshalServerResource(bytes, kind, cfg)
}
73308
func (c *Client) UnmarshalJSON(b []byte) error {
	temp := struct {
		Config  Config   `json:"config"`
		Cluster *Cluster `json:"cluster"`
	}{}
	err := json.Unmarshal(b, &temp)
	if err != nil {
		return err
	}

	c.Cluster = temp.Cluster
	c.Config = temp.Config
	return nil
}
1016099
func Marshal(data interface{}) ([]byte, error) {
	document, err := MarshalToStruct(data, nil)
	if err != nil {
		return nil, err
	}

	return json.Marshal(document)
}
395048
func Marshal(v interface{}) ([]byte, error) {
	if ImplementsPreJSONMarshaler(v) {
		err := v.(PreJSONMarshaler).PreMarshalJSON()
		if err != nil {
			return nil, err
		}
	}

	return json.Marshal(v)
}
954486
func (v *Uint64) UnmarshalJSON(data []byte) error {
	l := jlexer.Lexer{Data: data}
	v.UnmarshalEasyJSON(&l)
	return l.Error()
}
524413
func (configJSON ConfigJSON) Unmarshal(configData string, config interface{}) {
	configBytes := []byte(configData)
	json.Unmarshal(configBytes, config)
}
904729
func (call *Call) UnmarshalJSON(data []byte) error {
	var raw jsonCall
	if err := json.Unmarshal(data, &raw); err != nil {
		return err
	}
	createdAt, err := time.Parse(time.RFC3339, raw.CreatedAt)
	if err != nil {
		return fmt.Errorf("unable to parse Call CreatedAt: %v", err)
	}
	updatedAt, err := time.Parse(time.RFC3339, raw.UpdatedAt)
	if err != nil {
		return fmt.Errorf("unable to parse Call UpdatedAt: %v", err)
	}
	var endedAt *time.Time
	if raw.EndedAt != "" {
		eat, err := time.Parse(time.RFC3339, raw.EndedAt)
		if err != nil {
			return fmt.Errorf("unable to parse Call EndedAt: %v", err)
		}
		endedAt = &eat
	}
	*call = Call{
		ID:          raw.ID,
		Status:      CallStatus(raw.Status),
		Source:      raw.Source,
		Destination: raw.Destination,
		NumberID:    raw.NumberID,
		CreatedAt:   createdAt,
		UpdatedAt:   updatedAt,
		EndedAt:     endedAt,
	}
	return nil
}
1188998
func (ua *Uint64Array) UnmarshalJSON(data []byte) error {
	if isNull(data) {
		ua.Valid = false
		return nil
	}
	if data == nil {
		ua.Uint64Array, ua.Valid = nil, false
		return nil
	}
	ua.Valid = true
	return json.Unmarshal(data, &ua.Uint64Array)
}
594616
func (j *GoGoJSONPb) Unmarshal(data []byte, v interface{}) error {
	return unmarshalGoGoJSONPb(data, v)
}
962969
func (d Decoder) Unmarshal(data []byte, f Format) (interface{}, error) {
	if data == nil {
		switch f {
		case CSV:
			return make([][]string, 0), nil
		default:
			return make(map[string]interface{}), nil
		}

	}
	var v interface{}
	err := d.unmarshal(data, f, &v)

	return v, err
}
310208
func (*yamlMarshaller) Unmarshal(data []byte, v interface{}) error {
	return yaml.Unmarshal(data, v)
}
1215506
func unmarshal(ext string, buf []byte, out interface{}) error {
	switch ext {
	case ".json":
		return json.Unmarshal(buf, out)
	case ".yaml":
		return yaml.Unmarshal(buf, out)
	}

	return fmt.Errorf("unsupported file extension %v", ext)
}
797007
func (v *JSONWriteFormat) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson72863a49DecodeGithubComSignalfxMetricproxyProtocolCollectdFormat(&r, v)
	return r.Error()
}
1359425
func (h *Handle) UnmarshalJSON(data []byte) error {
	var (
		m   map[string]interface{}
		b   []byte
		err error
	)
	if err = json.Unmarshal(data, &m); err != nil {
		return err
	}
	h.id = m["id"].(string)
	bi, _ := json.Marshal(m["sequence"])
	if err := json.Unmarshal(bi, &b); err != nil {
		return err
	}
	return h.FromByteArray(b)
}
571740
func (sp *SerializerProto) Unmarshal(data []byte, protoData proto.Message) error {
	return proto.Unmarshal(data, protoData)
}
342596
func (s *ClusterService) Unmarshal(data []byte) error {
	newService := NewClusterService("", "")

	if err := json.Unmarshal(data, &newService); err != nil {
		return err
	}

	*s = newService

	return nil
}