// MarshalJSON assemble gss.Feed
504647
func (f Feed) MarshalJSON() ([]byte, error) {
	type image struct {
		URL string `json:"url"`
	}
	gi := image{URL: f.Logo}

	var link Link
	if len(f.Links) > 0 {
		link = f.Links[0]
	}

	var authors []Author
	if len(f.Authors) > 0 {
		authors = f.Authors
	}

	gf := &struct {
		Title       string     `json:"title"`
		Link        Link       `json:"link"`
		Description string     `json:"description"`
		Updated     string     `json:"updated"`
		Authors     []Author   `json:"authors"`
		Image       image      `json:"image"`
		CopyRight   string     `json:"copyright"`
		Categories  []Category `json:"categories"`
		Items       []Entry    `json:"items"`
	}{
		Title:       f.Title,
		Link:        link,
		Description: f.SubTitle,
		Updated:     f.Updated,
		Authors:     authors,
		Image:       gi,
		CopyRight:   f.Rights,
		Categories:  f.Categories,
		Items:       f.Entries,
	}
	return json.Marshal(gf)
}
107898
func (sts *SNSTaskState) MarshalJSON() ([]byte, error) {
	return sts.BaseTask.marshalMergedParams("arn:aws:states:::sns:publish",
		&sts.parameters)
}
1343879
func (re Unknown) MarshalJSON() ([]byte, error) {
	if re.RawJSON == nil {
		return []byte("null"), nil
	}
	return re.RawJSON, nil
}
532862
func (v Annotation) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson72863a49EncodeGithubComSignalfxGolibTraceFormat3(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1120187
func (noSecret ServicePrincipalNoSecret) MarshalJSON() ([]byte, error) {
	type tokenType struct {
		Type string `json:"type"`
	}
	return json.Marshal(tokenType{
		Type: "ServicePrincipalNoSecret",
	})
}
1259330
func (j JSONText) MarshalJSON() ([]byte, error) {
	if j == nil {
		return []byte(`null`), nil
	}
	return j, nil
}
74338
func (iem IndexErrMap) MarshalJSON() ([]byte, error) {
	tmp := make(map[string]string, len(iem))
	for k, v := range iem {
		tmp[k] = v.Error()
	}
	return json.Marshal(tmp)
}
391594
func (a *PipelineAggregation) MarshalJSON() ([]byte, error) {
	root := map[string]interface{}{
		"buckets_path": a.BucketPath,
	}

	for k, v := range a.Settings {
		if k != "" && v != nil {
			root[k] = v
		}
	}

	return json.Marshal(root)
}
1217538
func (v Attachment) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonCce3d1beEncodeGithubComMailgunMailgunGoEvents10(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
762681
func (n *AlertNodes) MarshalJSON() ([]byte, error) {
	type Alias AlertNodes
	var raw = &struct {
		Type string `json:"typeOf"`
		*Alias
	}{
		Type:  "alert",
		Alias: (*Alias)(n),
	}

	return json.Marshal(raw)
}
1189892
func (ls LineString) MarshalJSON() ([]byte, error) {
	return json.Marshal(Geometry{Coordinates: orb.LineString(ls)})
}
918180
func (v Failed) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents12(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
833173
func (wh Webhook) MarshalJSON() ([]byte, error) {
	data := jsonWebhook{
		ID:        wh.ID,
		URL:       wh.URL,
		Token:     wh.Token,
		CreatedAt: wh.CreatedAt.Format(time.RFC3339),
		UpdatedAt: wh.UpdatedAt.Format(time.RFC3339),
	}
	return json.Marshal(data)
}
1161852
func (sds SerialDevices) MarshalJSON() ([]byte, error) {
	temp := make([]*SerialDevice, len(sds))
	i := 0
	for _, item := range sds {
		temp[i] = item
		i++
	}
	return json.Marshal(temp)
}
50932
func (v Rejected) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents3(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
463536
func (tokenSecret ServicePrincipalTokenSecret) MarshalJSON() ([]byte, error) {
	type tokenType struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	}
	return json.Marshal(tokenType{
		Type:  "ServicePrincipalTokenSecret",
		Value: tokenSecret.ClientSecret,
	})
}
281339
func (results Results) MarshalJSON() ([]byte, error) {
	for _, result := range results {
		if result.ResultID() == "" {
			result.SetResultID(fmt.Sprintf("%d", &result))
		}

		if err := inferIQR(result); err != nil {
			return nil, err
		}
	}

	return json.Marshal([]Result(results))
}