// MarshalJSON implements json.Marshaler interface.
547750
func (f *Float32) MarshalJSON() ([]byte, error) {
	if f == nil || !f.Valid {
		return []byte("null"), nil
	}

	return json.Marshal(f.Float32)
}
85315
func (t *Array) MarshalJSON() ([]byte, error) {
	repr := map[string]interface{}{
		"type": t.typeMarker(),
	}
	if len(t.static) != 0 {
		repr["static"] = t.static
	}
	if t.dynamic != nil {
		repr["dynamic"] = t.dynamic
	}
	return json.Marshal(repr)
}
850532
func (v Complained) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents15(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1128082
func (v Clicked) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents16(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
973891
func (re encodable) MarshalJSON() ([]byte, error) {
	return Encode(re.e, re.obj)
}
1176388
func (e *Error) MarshalJSON() ([]byte, error) {
	return json.Marshal(&struct {
		Class ErrClass `json:"class"`
		Code  ErrCode  `json:"code"`
		Msg   string   `json:"message"`
	}{
		Class: e.class,
		Code:  e.code,
		Msg:   e.getMsg(),
	})
}
434336
func (dt *DateTime) MarshalJSON() ([]byte, error) {
	return []byte(time.Time(*dt).Format(dateTimeFmtTicked)), nil
}
1050177
func (c *Constant) MarshalJSON() ([]byte, error) {
	buffer := bytes.NewBufferString(fmt.Sprintf("\"%s\"", c))
	return buffer.Bytes(), nil
}
425078
func (r *Response) MarshalJSON() ([]byte, error) {
	return []byte(r.res), r.err
}
137633
func (t ts) MarshalJSON() ([]byte, error) {
	stringTime := t.Format(time.ANSIC)
	return json.Marshal(stringTime)
}
488682
func (s *SourceNetwork) MarshalJSON() ([]byte, error) {
	if s == nil {
		return []byte(""), nil
	}

	list := []string(*s)
	if len(list) == 0 || (len(list) == 1 && list[0] == "") {
		return []byte(`""`), nil
	}

	return json.Marshal(list)
}
1105825
func (functions Functions) MarshalJSON() ([]byte, error) {
	nm := make(map[name]map[Key]ValueSet)

	for _, f := range functions {
		if _, ok := nm[f.name()]; ok {
			for k, v := range f.toMap() {
				nm[f.name()][k] = v
			}
		} else {
			nm[f.name()] = f.toMap()
		}
	}

	return json.Marshal(nm)
}
14221
func (sf *ScalarFunction) MarshalJSON() ([]byte, error) {
	buffer := bytes.NewBufferString(fmt.Sprintf("\"%s\"", sf))
	return buffer.Bytes(), nil
}
366089
func (v InputSpanList) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3b0ebf6aEncodeGithubComSignalfxGatewayProtocolSignalfxFormat3(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
22305
func (v Accepted) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents17(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1007075
func (v CBGravatar) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonB0500db0EncodeGithubComFrancoispqtGojayBenchmarks3(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1222215
func (v Uint64) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	v.MarshalEasyJSON(&w)
	return w.Buffer.BuildBytes(), w.Error
}