// UnmarshalJSON statisied the json.Unmarshaler interface
978552
func (f *Float64) UnmarshalJSON(data []byte) error {

	// Attempt parsing the float normally
	v, err := strconv.ParseFloat(string(data), 64)

	// Attempt parsing the float as a string
	if err != nil {
		if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' {
			return fmt.Errorf("malformed data")
		}

		v, err = strconv.ParseFloat(string(data[1:len(data)-1]), 64)
		if err != nil {
			return err
		}
	}
	*f = Float64(v)
	return nil
}
802978
func (t *TraceV1Pretty) UnmarshalJSON(b []byte) error {
	var s []string
	if err := json.Unmarshal(b, &s); err != nil {
		return err
	}
	*t = TraceV1Pretty(s)
	return nil
}
873043
func (g *GUID) UnmarshalJSON(data []byte) error {
	g2, err := FromString(strings.Trim(string(data), "\""))
	if err != nil {
		return err
	}
	*g = *g2
	return nil
}
818804
func (v *InputSpanList) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3b0ebf6aDecodeGithubComSignalfxGatewayProtocolSignalfxFormat3(&r, v)
	return r.Error()
}
963544
func (mt *MutationState) UnmarshalJSON(data []byte) error {
	return json.Unmarshal(data, &mt.data)
}
1042333
func (i *Ref) UnmarshalJSON(data []byte) (err error) {
	var str string
	if err := json.Unmarshal(data, &str); err != nil {
		return err
	}
	*i, err = ParseRef(string(str))
	return err
}
864468
func (s *SamplePair) UnmarshalJSON(b []byte) error {
	v := [...]json.Unmarshaler{&s.Timestamp, &s.Value}
	return json.Unmarshal(b, &v)
}
172051
func (s *Sample) UnmarshalJSON(b []byte) error {
	v := struct {
		Metric Metric     `json:"metric"`
		Value  SamplePair `json:"value"`
	}{
		Metric: s.Metric,
		Value: SamplePair{
			Timestamp: s.Timestamp,
			Value:     s.Value,
		},
	}

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

	s.Metric = v.Metric
	s.Timestamp = v.Value.Timestamp
	s.Value = v.Value.Value

	return nil
}
1258627
func (t *Timestamp) UnmarshalJSON(data []byte) error {
	return json.Unmarshal(data, &t.Time)
}
1197964
func (vd *VolumeSnapshotDataList) UnmarshalJSON(data []byte) error {
	tmp := VolumeSnapshotDataListCopy{}
	err := json.Unmarshal(data, &tmp)
	if err != nil {
		return err
	}
	tmp2 := VolumeSnapshotDataList(tmp)
	*vd = tmp2
	return nil
}
939719
func (b *Bool) UnmarshalJSON(data []byte) error {
	if isNull(data) {
		b.Valid = false
		return nil
	}
	if err := json.Unmarshal(data, &b.Bool); err != nil {
		return err
	}
	b.Valid = true
	return nil
}
180150
func (key *Key) UnmarshalJSON(data []byte) error {
	var s string
	if err := json.Unmarshal(data, &s); err != nil {
		return err
	}

	parsedKey, err := parseKey(s)
	if err != nil {
		return err
	}

	*key = parsedKey
	return nil
}
934373
func (level *Level) UnmarshalJSON(data []byte) error {
	var (
		s   string
		err error
	)
	if len(data) >= 2 {
		s, err = strconv.Unquote(string(data))
		if err != nil {
			return err
		}
	} else {
		s = string(data)
	}
	return level.Decode(s)
}
1084217
func (ia *Int64Array) UnmarshalJSON(data []byte) error {
	if isNull(data) {
		ia.Valid = false
		return nil
	}
	if data == nil {
		ia.Int64Array, ia.Valid = nil, false
		return nil
	}
	ia.Valid = true
	return json.Unmarshal(data, &ia.Int64Array)
}
1369202
func (m *JsonHelperScannable) UnmarshalJSON(data []byte) error {
	if m == nil {
		return errors.New("JsonHelperScannable must not be nil")
	}
	jh := make(u.JsonHelper)
	if err := json.Unmarshal(data, &jh); err != nil {
		return err
	}
	*m = JsonHelperScannable(jh)
	return nil
}
995811
func (resp *IndicesSyncedFlushResponse) UnmarshalJSON(data []byte) error {
	m := make(map[string]json.RawMessage)
	err := json.Unmarshal(data, &m)
	if err != nil {
		return err
	}
	resp.Index = make(map[string]*IndicesShardsSyncedFlushResult)
	for k, v := range m {
		if k == "_shards" {
			if err := json.Unmarshal(v, &resp.Shards); err != nil {
				return err
			}
		} else {
			ix := new(IndicesShardsSyncedFlushResult)
			if err := json.Unmarshal(v, &ix); err != nil {
				return err
			}
			resp.Index[k] = ix
		}
	}
	return nil
}
360076
func (t *JSONTime) UnmarshalJSON(data []byte) error {
	ts, err := strconv.ParseInt(string(data), 10, 64)
	if err != nil {
		return err
	}
	*t = JSONTime(time.Unix(0, ts*1000))
	return nil
}