// MarshalJSON creates a JSON-encoded version of InodeDelta.
760388
func (i InodeDelta) MarshalJSON() ([]byte, error) {
	return json.Marshal(struct {
		Type DifferenceType `json:"type"`
		Path string         `json:"path"`
		Keys []KeyDelta     `json:"keys"`
	}{
		Type: i.diff,
		Path: i.path,
		Keys: i.keys,
	})
}
505369
func (u UUID) MarshalJSON() ([]byte, error) {
	var uuidSlice []string
	err := u.validateUUID()
	if err == nil {
		uuidSlice = []string{"uuid", u.GoUUID}
	} else {
		uuidSlice = []string{"named-uuid", u.GoUUID}
	}

	return json.Marshal(uuidSlice)
}
214926
func (i ID) MarshalJSON() ([]byte, error) {
	enc, err := i.Encode()
	if err != nil {
		return nil, err
	}
	return json.Marshal(string(enc))
}
113600
func (c *Constant) MarshalJSON() ([]byte, error) {
	return []byte(fmt.Sprintf("\"%s\"", c)), nil
}
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)
}
451454
func (u *Unstructured) MarshalJSON() ([]byte, error) {
	var buf bytes.Buffer
	err := UnstructuredJSONScheme.Encode(u, &buf)
	return buf.Bytes(), err
}
1323614
func (term *Term) MarshalJSON() ([]byte, error) {
	d := map[string]interface{}{
		"type":  TypeName(term.Value),
		"value": term.Value,
	}
	return json.Marshal(d)
}
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)
}
927857
func (v DSTopicsList) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonCfe4e5f0EncodeGithubComFrancoispqtGojayBenchmarks2(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1231413
func (del *Delete) MarshalJSON() ([]byte, error) {
	var tname, vindexName string
	if del.Table != nil {
		tname = del.Table.Name.String()
	}
	if del.Vindex != nil {
		vindexName = del.Vindex.String()
	}
	marshalDelete := struct {
		Opcode               DeleteOpcode
		Keyspace             *vindexes.Keyspace   `json:",omitempty"`
		Query                string               `json:",omitempty"`
		Vindex               string               `json:",omitempty"`
		Values               []sqltypes.PlanValue `json:",omitempty"`
		Table                string               `json:",omitempty"`
		OwnedVindexQuery     string               `json:",omitempty"`
		MultiShardAutocommit bool                 `json:",omitempty"`
		QueryTimeout         int                  `json:",omitempty"`
	}{
		Opcode:               del.Opcode,
		Keyspace:             del.Keyspace,
		Query:                del.Query,
		Vindex:               vindexName,
		Values:               del.Values,
		Table:                tname,
		OwnedVindexQuery:     del.OwnedVindexQuery,
		MultiShardAutocommit: del.MultiShardAutocommit,
		QueryTimeout:         del.QueryTimeout,
	}
	return jsonutil.MarshalNoEscape(marshalDelete)
}
490550
func (nds NetworkDevices) MarshalJSON() ([]byte, error) {
	temp := make([]*NetworkDevice, len(nds))
	i := 0
	for _, item := range nds {
		temp[i] = item
		i++
	}
	return json.Marshal(temp)
}
988794
func (m *DeserializedManifest) MarshalJSON() ([]byte, error) {
	if len(m.canonical) > 0 {
		return m.canonical, nil
	}

	return nil, errors.New("JSON representation not initialized in DeserializedManifest")
}
939851
func (j JSONText) MarshalJSON() ([]byte, error) {
	if len(j) == 0 {
		return emptyJSON, nil
	}
	return j, nil
}
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)
}
323622
func (t String) MarshalJSON() ([]byte, error) {
	return json.Marshal(map[string]interface{}{
		"type": t.typeMarker(),
	})
}
726588
func (i Info) MarshalJSON() ([]byte, error) {
	return marshalJSON(_Info(i), i.Extensions)
}
829734
func (v BinaryAnnotation) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3b0ebf6aEncodeGithubComSignalfxGatewayProtocolSignalfxFormat8(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}