func (mj *TaskEvent) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteString(`,"hostname":`)
	fflib.WriteJsonString(buf, string(mj.Hostname))
	buf.WriteString(`,"timestamp":`)
	fflib.AppendFloat(buf, float64(mj.Timestamp), 'g', -1, 32)
	buf.WriteString(`,"pid":`)
	fflib.FormatBits2(buf, uint64(mj.PID), 10, mj.PID < 0)
	buf.WriteString(`,"clock":`)
	fflib.FormatBits2(buf, uint64(mj.Clock), 10, mj.Clock < 0)
	buf.WriteString(`,"utcoffset":`)
	fflib.FormatBits2(buf, uint64(mj.UTCOffset), 10, mj.UTCOffset < 0)
	buf.WriteString(`,"uuid":`)
	fflib.WriteJsonString(buf, string(mj.UUID))
	buf.WriteString(`,"name":`)
	fflib.WriteJsonString(buf, string(mj.Name))
	buf.WriteString(`,"args":`)
	fflib.WriteJsonString(buf, string(mj.Args))
	buf.WriteString(`,"kwargs":`)
	fflib.WriteJsonString(buf, string(mj.Kwargs))
	buf.WriteString(`,"result":`)
	fflib.WriteJsonString(buf, string(mj.Result))
	buf.WriteString(`,"runtime":`)
	fflib.AppendFloat(buf, float64(mj.Runtime), 'g', -1, 32)
	buf.WriteString(`,"retries":`)
	fflib.FormatBits2(buf, uint64(mj.Retries), 10, mj.Retries < 0)
	buf.WriteString(`,"eta":`)
	fflib.FormatBits2(buf, uint64(mj.ETA), 10, mj.ETA < 0)
	buf.WriteString(`,"exception":`)
	fflib.WriteJsonString(buf, string(mj.Exception))
	buf.WriteString(`,"traceback":`)
	fflib.WriteJsonString(buf, string(mj.Traceback))
	if mj.Terminated {
		buf.WriteString(`,"terminated":true`)
	} else {
		buf.WriteString(`,"terminated":false`)
	}
	buf.WriteString(`,"signum":`)
	/* Interface types must use runtime reflection. type=interface {} kind=interface */
	err = buf.Encode(mj.Signum)
	if err != nil {
		return err
	}
	if mj.Expired {
		buf.WriteString(`,"expired":true`)
	} else {
		buf.WriteString(`,"expired":false`)
	}
	buf.WriteByte('}')
	return nil
}
Exemple #2
0
func (mj *LogFormat) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"Prefix":`)
	fflib.WriteJsonString(buf, string(mj.Prefix))
	buf.WriteString(`,"Time":`)

	{

		obj, err = mj.Time.MarshalJSON()
		if err != nil {
			return err
		}
		buf.Write(obj)

	}
	buf.WriteString(`,"Host":`)
	fflib.WriteJsonString(buf, string(mj.Host))
	buf.WriteString(`,"Level":`)
	fflib.FormatBits2(buf, uint64(mj.Level), 10, false)
	buf.WriteString(`,"Msg":`)
	fflib.WriteJsonString(buf, string(mj.Msg))
	buf.WriteString(`,"Caller":`)
	fflib.WriteJsonString(buf, string(mj.Caller))
	buf.WriteString(`,"LineNo":`)
	fflib.FormatBits2(buf, uint64(mj.LineNo), 10, mj.LineNo < 0)
	buf.WriteByte('}')
	return nil
}
Exemple #3
0
func (mj *Incident) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"event":`)
	if mj.EventName != nil {
		buf.WriteString(`"`)
		{
			enc := base64.NewEncoder(base64.StdEncoding, buf)
			enc.Write(reflect.Indirect(reflect.ValueOf(mj.EventName)).Bytes())
			enc.Close()
		}
		buf.WriteString(`"`)
	} else {
		buf.WriteString(`null`)
	}
	buf.WriteString(`,"time":`)
	fflib.FormatBits2(buf, uint64(mj.Time), 10, mj.Time < 0)
	buf.WriteString(`,"id":`)
	fflib.FormatBits2(buf, uint64(mj.Id), 10, mj.Id < 0)
	if mj.Active {
		buf.WriteString(`,"active":true`)
	} else {
		buf.WriteString(`,"active":false`)
	}
	buf.WriteString(`,"escalation":`)
	fflib.WriteJsonString(buf, string(mj.Escalation))
	buf.WriteString(`,"description":`)
	fflib.WriteJsonString(buf, string(mj.Description))
	buf.WriteString(`,"policy":`)
	fflib.WriteJsonString(buf, string(mj.Policy))
	buf.WriteString(`,"status":`)
	fflib.FormatBits2(buf, uint64(mj.Status), 10, mj.Status < 0)
	buf.WriteString(`,"host":`)
	fflib.WriteJsonString(buf, string(mj.Host))
	buf.WriteString(`,"service":`)
	fflib.WriteJsonString(buf, string(mj.Service))
	buf.WriteString(`,"sub_service":`)
	fflib.WriteJsonString(buf, string(mj.SubService))
	buf.WriteString(`,"metric":`)
	fflib.AppendFloat(buf, float64(mj.Metric), 'g', -1, 64)
	if mj.Tags == nil {
		buf.WriteString(`,"tags":null`)
	} else {
		buf.WriteString(`,"tags":{ `)
		for key, value := range mj.Tags {
			fflib.WriteJsonString(buf, key)
			buf.WriteString(`:`)
			fflib.WriteJsonString(buf, string(value))
			buf.WriteByte(',')
		}
		buf.Rewind(1)
		buf.WriteByte('}')
	}
	buf.WriteByte('}')
	return nil
}
Exemple #4
0
func (mj *StatsOutput) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"total":`)
	fflib.FormatBits2(buf, uint64(mj.Total), 10, false)
	buf.WriteString(`,"verified":`)
	fflib.FormatBits2(buf, uint64(mj.Verified), 10, false)
	buf.WriteByte('}')
	return nil
}
Exemple #5
0
func (mj *Event) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{ "type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteByte(',')
	if len(mj.Username) != 0 {
		buf.WriteString(`"username":`)
		fflib.WriteJsonString(buf, string(mj.Username))
		buf.WriteByte(',')
	}
	if len(mj.Color) != 0 {
		buf.WriteString(`"color":`)
		fflib.WriteJsonString(buf, string(mj.Color))
		buf.WriteByte(',')
	}
	if len(mj.Text) != 0 {
		buf.WriteString(`"text":`)
		fflib.WriteJsonString(buf, string(mj.Text))
		buf.WriteByte(',')
	}
	if mj.TopicID != 0 {
		buf.WriteString(`"topic-id":`)
		fflib.FormatBits2(buf, uint64(mj.TopicID), 10, mj.TopicID < 0)
		buf.WriteByte(',')
	}
	buf.WriteString(`"option-a":`)
	fflib.WriteJsonString(buf, string(mj.OptionA))
	buf.WriteString(`,"option-b":`)
	fflib.WriteJsonString(buf, string(mj.OptionB))
	buf.WriteByte(',')
	if mj.VoteMask != 0 {
		buf.WriteString(`"vote-mask":`)
		fflib.FormatBits2(buf, uint64(mj.VoteMask), 10, false)
		buf.WriteByte(',')
	}
	if len(mj.Error) != 0 {
		buf.WriteString(`"error":`)
		fflib.WriteJsonString(buf, string(mj.Error))
		buf.WriteByte(',')
	}
	buf.Rewind(1)
	buf.WriteByte('}')
	return nil
}
func (mj *WorkerEvent) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteString(`,"hostname":`)
	fflib.WriteJsonString(buf, string(mj.Hostname))
	buf.WriteString(`,"timestamp":`)
	fflib.AppendFloat(buf, float64(mj.Timestamp), 'g', -1, 32)
	buf.WriteString(`,"pid":`)
	fflib.FormatBits2(buf, uint64(mj.PID), 10, mj.PID < 0)
	buf.WriteString(`,"clock":`)
	fflib.FormatBits2(buf, uint64(mj.Clock), 10, mj.Clock < 0)
	buf.WriteString(`,"utcoffset":`)
	fflib.FormatBits2(buf, uint64(mj.UTCOffset), 10, mj.UTCOffset < 0)
	buf.WriteString(`,"sw_sys":`)
	fflib.WriteJsonString(buf, string(mj.SWSystem))
	buf.WriteString(`,"sw_ver":`)
	fflib.WriteJsonString(buf, string(mj.SWVersion))
	buf.WriteString(`,"loadavg":`)
	if mj.LoadAverage != nil {
		buf.WriteString(`[`)
		for i, v := range mj.LoadAverage {
			if i != 0 {
				buf.WriteString(`,`)
			}
			fflib.AppendFloat(buf, float64(v), 'g', -1, 32)
		}
		buf.WriteString(`]`)
	} else {
		buf.WriteString(`null`)
	}
	buf.WriteString(`,"freq":`)
	fflib.AppendFloat(buf, float64(mj.Freq), 'g', -1, 32)
	buf.WriteString(`,"sw_ident":`)
	fflib.WriteJsonString(buf, string(mj.SWIdentity))
	buf.WriteString(`,"processed":`)
	fflib.FormatBits2(buf, uint64(mj.Processed), 10, mj.Processed < 0)
	buf.WriteString(`,"active":`)
	fflib.FormatBits2(buf, uint64(mj.Active), 10, mj.Active < 0)
	buf.WriteByte('}')
	return nil
}
Exemple #7
0
func (mj *LocRate) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"limit":`)
	fflib.FormatBits2(buf, uint64(mj.Limit), 10, mj.Limit < 0)
	buf.WriteString(`,"remaining":`)
	fflib.FormatBits2(buf, uint64(mj.Remaining), 10, mj.Remaining < 0)
	buf.WriteByte('}')
	return nil
}
func (mj *RGB256) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"red":`)
	fflib.FormatBits2(buf, uint64(mj.Red), 10, false)
	buf.WriteString(`,"green":`)
	fflib.FormatBits2(buf, uint64(mj.Green), 10, false)
	buf.WriteString(`,"blue":`)
	fflib.FormatBits2(buf, uint64(mj.Blue), 10, false)
	buf.WriteByte('}')
	return nil
}
func (mj *User) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"ID":`)
	fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0)
	buf.WriteString(`,"Name":`)
	fflib.WriteJsonString(buf, string(mj.Name))
	buf.WriteString(`,"Age":`)
	fflib.FormatBits2(buf, uint64(mj.Age), 10, mj.Age < 0)
	buf.WriteString(`,"Created":`)

	{
		obj, err = mj.Created.MarshalJSON()
		if err != nil {
			return err
		}
		buf.Write(obj)
	}

	buf.WriteByte('}')
	return nil
}
func (mj *Event) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteString(`,"hostname":`)
	fflib.WriteJsonString(buf, string(mj.Hostname))
	buf.WriteString(`,"timestamp":`)
	fflib.AppendFloat(buf, float64(mj.Timestamp), 'g', -1, 32)
	buf.WriteString(`,"pid":`)
	fflib.FormatBits2(buf, uint64(mj.PID), 10, mj.PID < 0)
	buf.WriteString(`,"clock":`)
	fflib.FormatBits2(buf, uint64(mj.Clock), 10, mj.Clock < 0)
	buf.WriteString(`,"utcoffset":`)
	fflib.FormatBits2(buf, uint64(mj.UTCOffset), 10, mj.UTCOffset < 0)
	buf.WriteByte('}')
	return nil
}
func (mj *BadgeMessage) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"Data":`)
	fflib.FormatBits2(buf, uint64(mj.Data), 10, mj.Data < 0)
	buf.WriteString(`,"Type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteByte('}')
	return nil
}
Exemple #12
0
func (mj *Router) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"mac":`)
	fflib.WriteJsonString(buf, string(mj.Mac))
	buf.WriteString(`,"rssi":`)
	fflib.FormatBits2(buf, uint64(mj.Rssi), 10, mj.Rssi < 0)
	buf.WriteByte('}')
	return nil
}
Exemple #13
0
func (mj *TCARD) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"UNITLINK":`)
	fflib.WriteJsonString(buf, string(mj.UNITLINK))
	buf.WriteString(`,"CARDIDEX":`)
	fflib.FormatBits2(buf, uint64(mj.CARDIDEX), 10, mj.CARDIDEX < 0)
	buf.WriteString(`,"CARDBDID":`)
	fflib.FormatBits2(buf, uint64(mj.CARDBDID), 10, mj.CARDBDID < 0)
	buf.WriteString(`,"CARDKJND":`)
	fflib.FormatBits2(buf, uint64(mj.CARDKJND), 10, mj.CARDKJND < 0)
	buf.WriteString(`,"CARDKJQJ":`)
	fflib.FormatBits2(buf, uint64(mj.CARDKJQJ), 10, mj.CARDKJQJ < 0)
	buf.WriteString(`,"DEPTLINK":`)
	fflib.WriteJsonString(buf, string(mj.DEPTLINK))
	buf.WriteString(`,"CARDYWBZ":`)
	fflib.FormatBits2(buf, uint64(mj.CARDYWBZ), 10, mj.CARDYWBZ < 0)
	buf.WriteString(`,"SORTTYPE":`)
	fflib.WriteJsonString(buf, string(mj.SORTTYPE))
	buf.WriteString(`,"SORTNAME":`)
	fflib.WriteJsonString(buf, string(mj.SORTNAME))
	buf.WriteString(`,"SORTLINK":`)
	fflib.WriteJsonString(buf, string(mj.SORTLINK))
	buf.WriteString(`,"ZCLBTYPE":`)
	fflib.WriteJsonString(buf, string(mj.ZCLBTYPE))
	buf.WriteString(`,"ZCLBNAME":`)
	fflib.WriteJsonString(buf, string(mj.ZCLBNAME))
	buf.WriteString(`,"ZCLBLINK":`)
	fflib.WriteJsonString(buf, string(mj.ZCLBLINK))
	buf.WriteString(`,"CARDNAME":`)
	fflib.WriteJsonString(buf, string(mj.CARDNAME))
	buf.WriteString(`,"CARDZJNX":`)
	fflib.FormatBits2(buf, uint64(mj.CARDZJNX), 10, mj.CARDZJNX < 0)
	buf.WriteString(`,"CARDZJFF":`)
	fflib.WriteJsonString(buf, string(mj.CARDZJFF))
	buf.WriteString(`,"CARDZJZT":`)
	fflib.WriteJsonString(buf, string(mj.CARDZJZT))
	buf.WriteString(`,"CARDCODE":`)
	fflib.WriteJsonString(buf, string(mj.CARDCODE))
	buf.WriteString(`,"CARDJLDW":`)
	fflib.WriteJsonString(buf, string(mj.CARDJLDW))
	buf.WriteString(`,"CARDGGXH":`)
	fflib.WriteJsonString(buf, string(mj.CARDGGXH))
	buf.WriteByte('}')
	return nil
}
func (mj *Collection) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"Count":`)
	fflib.FormatBits2(buf, uint64(mj.Count), 10, mj.Count < 0)
	if mj.Dynamic {
		buf.WriteString(`,"Dynamic":true`)
	} else {
		buf.WriteString(`,"Dynamic":false`)
	}
	if mj.UnknownCount {
		buf.WriteString(`,"UnknownCount":true`)
	} else {
		buf.WriteString(`,"UnknownCount":false`)
	}
	if mj.Hidden {
		buf.WriteString(`,"Hidden":true`)
	} else {
		buf.WriteString(`,"Hidden":false`)
	}
	buf.WriteString(`,"Name":`)
	fflib.WriteJsonString(buf, string(mj.Name))
	buf.WriteString(`,"ResolveList":`)
	if mj.ResolveList != nil {
		buf.WriteString(`[`)
		for i, v := range mj.ResolveList {
			if i != 0 {
				buf.WriteString(`,`)
			}
			fflib.WriteJsonString(buf, string(v))
		}
		buf.WriteString(`]`)
	} else {
		buf.WriteString(`null`)
	}
	buf.WriteByte('}')
	return nil
}
Exemple #15
0
func (mj *State) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"version":`)
	fflib.WriteJsonString(buf, string(mj.Version))
	buf.WriteString(`,"id":`)
	fflib.WriteJsonString(buf, string(mj.ID))
	buf.WriteString(`,"pid":`)
	fflib.FormatBits2(buf, uint64(mj.Pid), 10, mj.Pid < 0)
	buf.WriteString(`,"bundlePath":`)
	fflib.WriteJsonString(buf, string(mj.BundlePath))
	buf.WriteByte('}')
	return nil
}
Exemple #16
0
func (mj *Fingerprint) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"group":`)
	fflib.WriteJsonString(buf, string(mj.Group))
	buf.WriteString(`,"username":`)
	fflib.WriteJsonString(buf, string(mj.Username))
	buf.WriteString(`,"location":`)
	fflib.WriteJsonString(buf, string(mj.Location))
	buf.WriteString(`,"timestamp":`)
	fflib.FormatBits2(buf, uint64(mj.Timestamp), 10, mj.Timestamp < 0)
	buf.WriteString(`,"wifi-fingerprint":`)
	if mj.WifiFingerprint != nil {
		buf.WriteString(`[`)
		for i, v := range mj.WifiFingerprint {
			if i != 0 {
				buf.WriteString(`,`)
			}

			{

				err = v.MarshalJSONBuf(buf)
				if err != nil {
					return err
				}

			}
		}
		buf.WriteString(`]`)
	} else {
		buf.WriteString(`null`)
	}
	buf.WriteByte('}')
	return nil
}
Exemple #17
0
func (mj *Topic) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"option-a":`)
	fflib.WriteJsonString(buf, string(mj.OptionA))
	buf.WriteString(`,"option-b":`)
	fflib.WriteJsonString(buf, string(mj.OptionB))
	buf.WriteString(`,"id":`)
	fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0)
	buf.WriteString(`,"created":`)

	{

		obj, err = mj.Created.MarshalJSON()
		if err != nil {
			return err
		}
		buf.Write(obj)

	}
	buf.WriteString(`,"ends":`)

	{

		obj, err = mj.Ends.MarshalJSON()
		if err != nil {
			return err
		}
		buf.Write(obj)

	}
	buf.WriteByte('}')
	return nil
}
func (mj *ServiceDefinition) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteString(`,"container_port":`)
	fflib.FormatBits2(buf, uint64(mj.ContainerPort), 10, mj.ContainerPort < 0)
	if mj.NamePattern != nil {
		buf.WriteString(`,"name_pattern":`)
		fflib.WriteJsonString(buf, string(*mj.NamePattern))
	} else {
		buf.WriteString(`,"name_pattern":null`)
	}
	buf.WriteByte('}')
	return nil
}
Exemple #19
0
func (mj *JSONError) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{ `)
	if mj.Status != 0 {
		buf.WriteString(`"status":`)
		fflib.FormatBits2(buf, uint64(mj.Status), 10, mj.Status < 0)
		buf.WriteByte(',')
	}
	if len(mj.Code) != 0 {
		buf.WriteString(`"code":`)
		fflib.WriteJsonString(buf, string(mj.Code))
		buf.WriteByte(',')
	}
	if len(mj.Type) != 0 {
		buf.WriteString(`"type":`)
		fflib.WriteJsonString(buf, string(mj.Type))
		buf.WriteByte(',')
	}
	if len(mj.Message) != 0 {
		buf.WriteString(`"message":`)
		fflib.WriteJsonString(buf, string(mj.Message))
		buf.WriteByte(',')
	}
	if len(mj.MoreInfo) != 0 {
		buf.WriteString(`"moreInfo":`)
		fflib.WriteJsonString(buf, string(mj.MoreInfo))
		buf.WriteByte(',')
	}
	buf.Rewind(1)
	buf.WriteByte('}')
	return nil
}
Exemple #20
0
func (mj *TokenResponse) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{ "access_token":`)
	fflib.WriteJsonString(buf, string(mj.AccessToken))
	buf.WriteString(`,"token_type":`)
	fflib.WriteJsonString(buf, string(mj.TokenType))
	buf.WriteByte(',')
	if mj.ExpiresIn != 0 {
		buf.WriteString(`"expires_in":`)
		fflib.FormatBits2(buf, uint64(mj.ExpiresIn), 10, mj.ExpiresIn < 0)
		buf.WriteByte(',')
	}
	if len(mj.RefreshToken) != 0 {
		buf.WriteString(`"refresh_token":`)
		fflib.WriteJsonString(buf, string(mj.RefreshToken))
		buf.WriteByte(',')
	}
	if len(mj.Scope) != 0 {
		buf.WriteString(`"scope":`)
		fflib.WriteJsonString(buf, string(mj.Scope))
		buf.WriteByte(',')
	}
	if len(mj.State) != 0 {
		buf.WriteString(`"state":`)
		fflib.WriteJsonString(buf, string(mj.State))
		buf.WriteByte(',')
	}
	buf.Rewind(1)
	buf.WriteByte('}')
	return nil
}
func (mj *AnyType) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"Type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteString(`,"ID":`)
	fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0)
	buf.WriteString(`,"ExName":`)
	fflib.WriteJsonString(buf, string(mj.ExName))
	buf.WriteString(`,"TargetFormat":`)
	fflib.WriteJsonString(buf, string(mj.TargetFormat))
	buf.WriteString(`,"TargetQuality":`)
	fflib.WriteJsonString(buf, string(mj.TargetQuality))
	if mj.IsSharpen {
		buf.WriteString(`,"IsSharpen":true`)
	} else {
		buf.WriteString(`,"IsSharpen":false`)
	}
	buf.WriteString(`,"Radius":`)
	fflib.FormatBits2(buf, uint64(mj.Radius), 10, mj.Radius < 0)
	buf.WriteString(`,"Sigma":`)
	fflib.FormatBits2(buf, uint64(mj.Sigma), 10, mj.Sigma < 0)
	buf.WriteString(`,"Channels":`)
	fflib.WriteJsonString(buf, string(mj.Channels))
	buf.WriteString(`,"List":`)

	{

		err = mj.List.MarshalJSONBuf(buf)
		if err != nil {
			return err
		}

	}
	buf.WriteString(`,"Proportion":`)
	fflib.AppendFloat(buf, float64(mj.Proportion), 'g', -1, 64)
	buf.WriteString(`,"Transparency":`)
	fflib.AppendFloat(buf, float64(mj.Transparency), 'g', -1, 64)
	buf.WriteString(`,"Position":`)
	fflib.WriteJsonString(buf, string(mj.Position))
	buf.WriteString(`,"X":`)
	fflib.FormatBits2(buf, uint64(mj.X), 10, mj.X < 0)
	buf.WriteString(`,"Y":`)
	fflib.FormatBits2(buf, uint64(mj.Y), 10, mj.Y < 0)
	buf.WriteString(`,"MinWidth":`)
	fflib.FormatBits2(buf, uint64(mj.MinWidth), 10, mj.MinWidth < 0)
	buf.WriteString(`,"MinHeight":`)
	fflib.FormatBits2(buf, uint64(mj.MinHeight), 10, mj.MinHeight < 0)
	buf.WriteString(`,"FileBytes":`)
	if mj.FileBytes != nil {
		buf.WriteString(`"`)
		{
			enc := base64.NewEncoder(base64.StdEncoding, buf)
			enc.Write(reflect.Indirect(reflect.ValueOf(mj.FileBytes)).Bytes())
			enc.Close()
		}
		buf.WriteString(`"`)
	} else {
		buf.WriteString(`null`)
	}
	buf.WriteString(`,"Width":`)
	fflib.FormatBits2(buf, uint64(mj.Width), 10, mj.Width < 0)
	buf.WriteString(`,"Height":`)
	fflib.FormatBits2(buf, uint64(mj.Height), 10, mj.Height < 0)
	buf.WriteString(`,"Taipe":`)
	fflib.FormatBits2(buf, uint64(mj.Taipe), 10, mj.Taipe < 0)
	buf.WriteByte('}')
	return nil
}