// MarshalJSON implements json.Marshaler interface.
182690
func (p *PhysicalApply) MarshalJSON() ([]byte, error) {
	join, err := json.Marshal(p.PhysicalJoin)
	if err != nil {
		return nil, errors.Trace(err)
	}
	buffer := bytes.NewBufferString("{")
	buffer.WriteString(fmt.Sprintf(
		"\"innerPlan\": \"%s\",\n "+
			"\"outerPlan\": \"%s\",\n "+
			"\"join\": %s\n}", p.children[1].GetID(), p.children[0].GetID(), join))
	return buffer.Bytes(), nil
}
545903
func (r Response) MarshalJSON() ([]byte, error) {
	return marshalJSON(_Response(r), r.Extensions)
}
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)
}
399790
func (v DSUser) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjsonCfe4e5f0EncodeGithubComFrancoispqtGojayBenchmarks1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
402086
func (c *ConfigPolicy) MarshalJSON() ([]byte, error) {
	return json.Marshal(&struct {
		Config *ctree.ConfigTree `json:"config"`
	}{
		Config: c.config,
	})
}
504045
func (s Services) MarshalJSON() ([]byte, error) {
	data, err := s.MarshalYAML()
	if err != nil {
		return nil, err
	}
	return json.MarshalIndent(data, "", "  ")
}
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
}
251645
func (args Args) MarshalJSON() ([]byte, error) {
	if len(args.fields) == 0 {
		return []byte{}, nil
	}
	return json.Marshal(args.fields)
}
1332101
func (c Cid) MarshalJSON() ([]byte, error) {
	if !c.Defined() {
		return []byte("null"), nil
	}
	return []byte(fmt.Sprintf("{\"/\":\"%s\"}", c.String())), nil
}
470679
func (s *StringRule) MarshalJSON() ([]byte, error) {
	return json.Marshal(&struct {
		Key      string             `json:"key"`
		Required bool               `json:"required"`
		Default  ctypes.ConfigValue `json:"default"`
		Type     string             `json:"type"`
	}{
		Key:      s.key,
		Required: s.required,
		Default:  s.Default(),
		Type:     StringType,
	})
}
957822
func (u UnitBytes) MarshalJSON() ([]byte, error) {
	return []byte(fmt.Sprintf(`"%d"`, u)), nil
}
115194
func (sa *StringArray) MarshalJSON() ([]byte, error) {
	if sa == nil || !sa.Valid {
		return []byte("null"), nil
	}

	return json.Marshal(sa.StringArray)
}
849216
func (rc *RequestContext) MarshalJSON() ([]byte, error) {
	return json.Marshal(&jsonRequestContext{
		(*requestContextAlias)(rc),
		rc.Authorizer,
	})
}
1158982
func (p Browser) MarshalJSON() ([]byte, error) {
	aps := map[string]interface{}{"alert": p.Alert, "url-args": p.URLArgs}
	return json.Marshal(map[string]interface{}{"aps": aps})
}
270883
func (n *node) MarshalJSON() ([]byte, error) {
	return json.Marshal(&struct {
		Nodes     []*node  `json:"nodes"`
		Keys      []string `json:"keys"`
		KeysBytes []byte   `json:"keysbytes"`
		Node      Node     `json:"node"`
	}{
		Nodes:     n.nodes,
		Keys:      n.keys,
		KeysBytes: n.keysBytes,
		Node:      n.Node,
	})
}
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)
}
986680
func (t *TimeAPI) MarshalJSON() ([]byte, error) {
	return json.Marshal(t.S.UNIX())
}