//MarshalJSON ...
968723
func destinationFlagsToString(fwdMethod uint32) string {
	var value string

	switch fwdMethod {
	case ipvs.ConnectionFlagMasq:
		value = "nat"
		// *flags =
	case ipvs.ConnectionFlagTunnel:
		value = "tunnel"
	default:
		// Default is Direct Routing
		value = "route"
	}

	return value
}
977458
func (obj *object) MarshalJSON() ([]byte, error) {
	sl := make([][2]*Term, obj.Len())
	for i := range obj.keys {
		k := obj.keys[i]
		sl[i] = Item(k, obj.get(k).value)
	}
	return json.Marshal(sl)
}
898834
func (t Any) MarshalJSON() ([]byte, error) {
	return json.Marshal(map[string]interface{}{
		"type": t.typeMarker(),
		"of":   []Type(t),
	})
}
939851
func (j JSONText) MarshalJSON() ([]byte, error) {
	if len(j) == 0 {
		return emptyJSON, nil
	}
	return j, nil
}
865624
func (v Generic) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents11(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
849216
func (rc *RequestContext) MarshalJSON() ([]byte, error) {
	return json.Marshal(&jsonRequestContext{
		(*requestContextAlias)(rc),
		rc.Authorizer,
	})
}
413851
func (s *Sources) MarshalJSON() ([]byte, error) {
	srcs := make([]Source, len(s.Sources))
	for i, src := range s.Sources {
		srcs[i] = Source{src}
	}
	return json.Marshal(srcs)
}
1362454
func (m Mapping) MarshalJSON() ([]byte, error) {
	data := map[string]interface{}{m.Name: m.Entries}
	return json.Marshal(data)
}
1036865
func (p Protected) MarshalJSON() ([]byte, error) {
	b, err := json.Marshal(map[string]interface{}(p))
	if err != nil {
		return nil, err
	}
	return EncodeEscape(b), nil
}
22305
func (v Accepted) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents17(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
454827
func (v Opened) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents5(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
43390
func (h *Handle) MarshalJSON() ([]byte, error) {
	m := map[string]interface{}{
		"id": h.id,
	}

	b, err := h.ToByteArray()
	if err != nil {
		return nil, err
	}
	m["sequence"] = b
	return json.Marshal(m)
}
55068
func (v *IntString) MarshalJSON() ([]byte, error) {
	if v.Valid {
		strVal := strconv.FormatInt(v.Value, 10)
		return []byte(strVal), nil
	}

	return []byte(`"null"`), nil
}
395493
func (v Subscriber) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson639f989aEncodeCodeCloudfoundryOrgGorouterMbus1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1050177
func (c *Constant) MarshalJSON() ([]byte, error) {
	buffer := bytes.NewBufferString(fmt.Sprintf("\"%s\"", c))
	return buffer.Bytes(), nil
}
432699
func (dto *DatetimeOnly) MarshalJSON() ([]byte, error) {
	return []byte(time.Time(*dto).Format(datetimeOnlyFmtTicked)), nil
}
850532
func (v Complained) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents15(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}