// MarshalJSON will marshal an OVSDB style UUID to a JSON encoded byte array
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)
}
458709
func (dgis *DynamoDBGetItemState) MarshalJSON() ([]byte, error) {
	return dgis.BaseTask.marshalMergedParams("arn:aws:states:::dynamodb:getItem",
		&dgis.parameters)
}
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)
}
703095
func (dgis *DynamoDBPutItemState) MarshalJSON() ([]byte, error) {
	return dgis.BaseTask.marshalMergedParams("arn:aws:states:::dynamodb:putItem",
		&dgis.parameters)
}
624417
func (upd *Update) MarshalJSON() ([]byte, error) {
	var tname, vindexName string
	if upd.Table != nil {
		tname = upd.Table.Name.String()
	}
	if upd.Vindex != nil {
		vindexName = upd.Vindex.String()
	}
	marshalUpdate := struct {
		Opcode               UpdateOpcode
		Keyspace             *vindexes.Keyspace              `json:",omitempty"`
		Query                string                          `json:",omitempty"`
		Vindex               string                          `json:",omitempty"`
		Values               []sqltypes.PlanValue            `json:",omitempty"`
		ChangedVindexValues  map[string][]sqltypes.PlanValue `json:",omitempty"`
		Table                string                          `json:",omitempty"`
		OwnedVindexQuery     string                          `json:",omitempty"`
		MultiShardAutocommit bool                            `json:",omitempty"`
		QueryTimeout         int                             `json:",omitempty"`
	}{
		Opcode:               upd.Opcode,
		Keyspace:             upd.Keyspace,
		Query:                upd.Query,
		Vindex:               vindexName,
		Values:               upd.Values,
		ChangedVindexValues:  upd.ChangedVindexValues,
		Table:                tname,
		OwnedVindexQuery:     upd.OwnedVindexQuery,
		MultiShardAutocommit: upd.MultiShardAutocommit,
		QueryTimeout:         upd.QueryTimeout,
	}
	return jsonutil.MarshalNoEscape(marshalUpdate)
}
548109
func (b Buffer) MarshalJSON() ([]byte, error) {
	v, err := b.Base64Encode()
	if err != nil {
		return nil, errors.Wrap(err, "failed to encode to base64")
	}
	return json.Marshal(string(v))
}
395493
func (v Subscriber) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson639f989aEncodeCodeCloudfoundryOrgGorouterMbus1(&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
}
973891
func (re encodable) MarshalJSON() ([]byte, error) {
	return Encode(re.e, re.obj)
}
544058
func (bj BinaryJSON) MarshalJSON() ([]byte, error) {
	buf := make([]byte, 0, len(bj.Value)*3/2)
	return bj.marshalTo(buf)
}
645043
func (key Key) MarshalJSON() ([]byte, error) {
	if !key.IsValid() {
		return nil, fmt.Errorf("unknown key %v", key)
	}

	return json.Marshal(string(key))
}
522415
func MarshalJSON(v interface{}) ([]byte, error) {
	val, _, err := marshalValue(reflect.ValueOf(v), reflect.StructField{
		Tag: `json:",wrapper"`,
	})
	if err != nil {
		return nil, err
	}
	return json.Marshal(val)
}
508831
func (e encodable) MarshalJSON() ([]byte, error) {
	return Encode(e.E, e.obj)
}
951072
func MarshalJSON(errobj error) ([]byte, error) {
	errjson, err := newJSON(1, errobj)
	if errjson == nil || err != nil {
		return []byte(""), err
	}
	return json.Marshal(errjson)
}
216607
func (o OvsSet) MarshalJSON() ([]byte, error) {
	var oSet []interface{}
	oSet = append(oSet, "set")
	oSet = append(oSet, o.GoSet)
	return json.Marshal(oSet)
}
1203687
func (e Enclosure) MarshalJSON() ([]byte, error) {
	ge := &struct {
		URL    string `json:"url"`
		Length int64  `json:"length"`
		Type   string `json:"type"`
	}{
		URL:    e.URL,
		Length: e.Length,
		Type:   e.Type,
	}
	return json.Marshal(ge)
}
399790
func (v DSUser) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonCfe4e5f0EncodeGithubComFrancoispqtGojayBenchmarks1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}