// MarshalJSON marshals these responses to json
166019
func (g GenStatusCodeResponses) MarshalJSON() ([]byte, error) {
	if g == nil {
		return nil, nil
	}
	var buf bytes.Buffer
	buf.WriteRune('{')
	for i, v := range g {
		rb, err := json.Marshal(v)
		if err != nil {
			return nil, err
		}
		if i > 0 {
			buf.WriteRune(',')
		}
		buf.WriteString(fmt.Sprintf("%q:", strconv.Itoa(v.Code)))
		buf.Write(rb)
	}
	buf.WriteRune('}')
	return buf.Bytes(), nil
}
1141499
func (v SmallPayload) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson890029d8EncodeGithubComFrancoispqtGojayBenchmarks(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
865624
func (v Generic) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents11(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
161807
func (s Sample) MarshalJSON() ([]byte, error) {
	v := struct {
		Metric Metric     `json:"metric"`
		Value  SamplePair `json:"value"`
	}{
		Metric: s.Metric,
		Value: SamplePair{
			Timestamp: s.Timestamp,
			Value:     s.Value,
		},
	}

	return json.Marshal(&v)
}
517043
func (e *Error) MarshalJSON() (result []byte, err error) {
	ee := errEncode{
		Code: e.Code,
		Msg:  e.Msg,
		Op:   e.Op,
	}
	if e.Err != nil {
		if _, ok := e.Err.(*Error); ok {
			_, err := e.Err.(*Error).MarshalJSON()
			if err != nil {
				return result, err
			}
			ee.Err = e.Err
		} else {
			ee.Err = e.Err.Error()
		}
	}
	return json.Marshal(ee)
}
238971
func (v DeliveryStatus) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonCce3d1beEncodeGithubComMailgunMailgunGoEvents7(&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
}
1158982
func (p Browser) MarshalJSON() ([]byte, error) {
	aps := map[string]interface{}{"alert": p.Alert, "url-args": p.URLArgs}
	return json.Marshal(map[string]interface{}{"aps": aps})
}
863293
func (m *marshalableError) MarshalJSON() ([]byte, error) {
	return json.Marshal(m.err.Error())
}
993315
func (v Flags) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonCce3d1beEncodeGithubComMailgunMailgunGoEvents5(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
268695
func (e Unknown) MarshalJSON() ([]byte, error) {
	// If ContentType is unset, we assume this is JSON.
	if e.ContentType != "" && e.ContentType != ContentTypeJSON {
		return nil, errors.New("runtime.Unknown: MarshalJSON on non-json data")
	}
	if e.Raw == nil {
		return []byte("null"), nil
	}
	return e.Raw, nil
}
399790
func (v DSUser) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonCfe4e5f0EncodeGithubComFrancoispqtGojayBenchmarks1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
532862
func (v Annotation) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson72863a49EncodeGithubComSignalfxGolibTraceFormat3(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1175370
func (resp *Response) MarshalJSON() ([]byte, error) {
	canonicalResponse := canonicalResponse{
		Code: resp.Code,
		Body: resp.Body,
	}
	if len(resp.Headers) != 0 {
		canonicalResponse.Headers = make(map[string]string)
		for eachKey, eachValue := range resp.Headers {
			canonicalResponse.Headers[strings.ToLower(eachKey)] = eachValue
		}
	}
	return json.Marshal(&canonicalResponse)
}
306401
func (that *JSONNode) MarshalJSON() ([]byte, error) {
	var ret []byte
	var err error
	switch that.t {
	case TypeMap:
		ret, err = json.Marshal(that.m)
	case TypeArray:
		ret, err = json.Marshal(that.a)
	case TypeValue:
		ret, err = json.Marshal(that.v)
	default:
		ret, err = json.Marshal(nil)
	}
	if err != nil {
		return nil, err
	}
	return ret, err
}
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)
}
384479
func (u *User) MarshalJSON() ([]byte, error) {
	tmp := make(map[string]interface{})

	for item := range u.Iterator() {
		tmp[item.Key] = item.Val
	}
	return json.Marshal(tmp)
}