// MarshalJSON returns JSON encoded bytes representing num.
516715
func (num Number) MarshalJSON() ([]byte, error) {
	return json.Marshal(json.Number(num))
}
1125318
func (l *Limit) MarshalJSON() ([]byte, error) {
	marshalLimit := struct {
		Opcode string
		Count  sqltypes.PlanValue
		Offset sqltypes.PlanValue
		Input  Primitive
	}{
		Opcode: "Limit",
		Count:  l.Count,
		Offset: l.Offset,
		Input:  l.Input,
	}
	return json.Marshal(marshalLimit)
}
1343879
func (re Unknown) MarshalJSON() ([]byte, error) {
	if re.RawJSON == nil {
		return []byte("null"), nil
	}
	return re.RawJSON, nil
}
137633
func (t ts) MarshalJSON() ([]byte, error) {
	stringTime := t.Format(time.ANSIC)
	return json.Marshal(stringTime)
}
899549
func (v ClientInfo) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonCce3d1beEncodeGithubComMailgunMailgunGoEvents8(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
323622
func (t String) MarshalJSON() ([]byte, error) {
	return json.Marshal(map[string]interface{}{
		"type": t.typeMarker(),
	})
}
238482
func (t Time) MarshalJSON() ([]byte, error) {
	var seconds, nanos int64
	if t.Seconds != nil {
		seconds = *t.Seconds
	}
	if t.Nanos != nil {
		nanos = int64(*t.Nanos)
	}
	return json.Marshal(time.Unix(seconds, nanos))
}
810998
func (ia *Int64Array) MarshalJSON() ([]byte, error) {
	if ia == nil || !ia.Valid {
		return []byte("null"), nil
	}
	return json.Marshal(ia.Int64Array)
}
1339010
func (n *NullTime) MarshalJSON() ([]byte, error) {
	if !n.Valid {
		return nullString, nil
	}

	return json.Marshal(n.Time)
}
395493
func (v Subscriber) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson639f989aEncodeCodeCloudfoundryOrgGorouterMbus1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1265966
func (t Unix) MarshalJSON() ([]byte, error) {
	secs := time.Time(t).Unix()
	return []byte(strconv.FormatInt(secs, 10)), nil
}
478804
func (e JSONError) MarshalJSON() ([]byte, error) {
	if e.error == nil {
		return []byte("null"), nil
	}
	return json.Marshal(e.Error())
}
469025
func (c ChecksumInfo) MarshalJSON() ([]byte, error) {
	info := checksumInfoJSON{
		Name:      c.Name,
		Algorithm: c.Algorithm.String(),
		Hash:      hex.EncodeToString(c.Hash),
	}
	return json.Marshal(info)
}
1118300
func (q Quantity) MarshalJSON() ([]byte, error) {
	if len(q.s) > 0 {
		out := make([]byte, len(q.s)+2)
		out[0], out[len(out)-1] = '"', '"'
		copy(out[1:], q.s)
		return out, nil
	}
	result := make([]byte, int64QuantityExpectedBytes, int64QuantityExpectedBytes)
	result[0] = '"'
	number, suffix := q.CanonicalizeBytes(result[1:1])
	// if the same slice was returned to us that we passed in, avoid another allocation by copying number into
	// the source slice and returning that
	if len(number) > 0 && &number[0] == &result[1] && (len(number)+len(suffix)+2) <= int64QuantityExpectedBytes {
		number = append(number, suffix...)
		number = append(number, '"')
		return result[:1+len(number)], nil
	}
	// if CanonicalizeBytes needed more space than our slice provided, we may need to allocate again so use
	// append
	result = result[:1]
	result = append(result, number...)
	result = append(result, suffix...)
	result = append(result, '"')
	return result, nil
}
839425
func (n NullInt64) MarshalJSON() ([]byte, error) {
	if n.Valid {
		return json.Marshal(n.Int64)
	}
	return nullString, nil
}
544058
func (bj BinaryJSON) MarshalJSON() ([]byte, error) {
	buf := make([]byte, 0, len(bj.Value)*3/2)
	return bj.marshalTo(buf)
}
1061427
func (o *Object) MarshalJSON() ([]byte, error) {
	ctx := _builtinJSON_stringifyContext{
		r: o.runtime,
	}
	ex := o.runtime.vm.try(func() {
		if !ctx.do(o) {
			ctx.buf.WriteString("null")
		}
	})
	if ex != nil {
		return nil, ex
	}
	return ctx.buf.Bytes(), nil
}