// MarshalJSON returns the JSON encoding of r.
545903
func (r Response) MarshalJSON() ([]byte, error) {
	return marshalJSON(_Response(r), r.Extensions)
}
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
}
425078
func (r *Response) MarshalJSON() ([]byte, error) {
	return []byte(r.res), r.err
}
486285
func (v Stored) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
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)
}
1090055
func (e EncodedHeader) MarshalJSON() ([]byte, error) {
	buf, err := e.Base64Encode()
	if err != nil {
		return nil, errors.Wrap(err, "failed to base64 encode encoded header")
	}
	return json.Marshal(string(buf))
}
645043
func (key Key) MarshalJSON() ([]byte, error) {
	if !key.IsValid() {
		return nil, fmt.Errorf("unknown key %v", key)
	}

	return json.Marshal(string(key))
}
973891
func (re encodable) MarshalJSON() ([]byte, error) {
	return Encode(re.e, re.obj)
}
1026747
func (r *Row) MarshalJSON() ([]byte, error) {
	var o struct {
		Attrs   map[string]interface{} `json:"attrs"`
		Columns []uint64               `json:"columns"`
		Keys    []string               `json:"keys,omitempty"`
	}
	o.Columns = r.Columns()
	o.Keys = r.Keys

	o.Attrs = r.Attrs
	if o.Attrs == nil {
		o.Attrs = make(map[string]interface{})
	}

	return json.Marshal(&o)
}
160496
func (qrs *Rules) MarshalJSON() ([]byte, error) {
	b := bytes.NewBuffer(nil)
	_, _ = b.WriteString("[")
	for i, rule := range qrs.rules {
		if i != 0 {
			_, _ = b.WriteString(",")
		}
		safeEncode(b, "", rule)
	}
	_, _ = b.WriteString("]")
	return b.Bytes(), nil
}
1051093
func (u *Uint64) MarshalJSON() ([]byte, error) {
	if u == nil || !u.Valid {
		return []byte("null"), nil
	}

	return json.Marshal(u.Uint64)
}
810998
func (ia *Int64Array) MarshalJSON() ([]byte, error) {
	if ia == nil || !ia.Valid {
		return []byte("null"), nil
	}
	return json.Marshal(ia.Int64Array)
}
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)
}
1101929
func (s Strings) MarshalJSON() ([]byte, error) {
	if len(s) == 1 {
		return json.Marshal(s[0])
	}
	return json.Marshal([]string(s))
}
113600
func (c *Constant) MarshalJSON() ([]byte, error) {
	return []byte(fmt.Sprintf("\"%s\"", c)), nil
}
400345
func (x Pol) MarshalJSON() ([]byte, error) {
	buf := strconv.AppendUint([]byte{'"'}, uint64(x), 16)
	buf = append(buf, '"')
	return buf, nil
}
1332101
func (c Cid) MarshalJSON() ([]byte, error) {
	if !c.Defined() {
		return []byte("null"), nil
	}
	return []byte(fmt.Sprintf("{\"/\":\"%s\"}", c.String())), nil
}