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(`{"Payload":`)

	{

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

	}
	buf.WriteString(`,"service":`)
	fflib.WriteJsonString(buf, string(mj.Service))
	buf.WriteString(`,"type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteByte('}')
	return nil
}
Example #2
0
func (mj *InMsg) 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(`,"data":`)

	{

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

	}
	buf.WriteByte('}')
	return nil
}
func (mj *Reader) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{}`)
	return nil
}
func (mj *Domain) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"Domain":`)
	fflib.WriteJsonString(buf, string(mj.Domain))
	buf.WriteByte('}')
	return nil
}
func (mj *Postal) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"Code":`)
	fflib.WriteJsonString(buf, string(mj.Code))
	buf.WriteByte('}')
	return nil
}
Example #6
0
func (mj *Person) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{}`)
	return nil
}
func (mj *Traits) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	_ = obj
	_ = err
	if mj.IsAnonymousProxy {
		buf.WriteString(`{"IsAnonymousProxy":true`)
	} else {
		buf.WriteString(`{"IsAnonymousProxy":false`)
	}
	if mj.IsSatelliteProvider {
		buf.WriteString(`,"IsSatelliteProvider":true`)
	} else {
		buf.WriteString(`,"IsSatelliteProvider":false`)
	}
	buf.WriteByte('}')
	return nil
}
Example #8
0
func (mj *RGB) 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.AppendFloat(buf, float64(mj.Red), 'g', -1, 64)
	buf.WriteString(`,"green":`)
	fflib.AppendFloat(buf, float64(mj.Green), 'g', -1, 64)
	buf.WriteString(`,"blue":`)
	fflib.AppendFloat(buf, float64(mj.Blue), 'g', -1, 64)
	buf.WriteByte('}')
	return nil
}
Example #9
0
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 *ISP) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	var scratch fflib.FormatBitsScratch
	_ = scratch
	_ = obj
	_ = err
	buf.WriteString(`{"AutonomousSystemNumber":`)
	fflib.FormatBits(&scratch, buf, uint64(mj.AutonomousSystemNumber), 10, false)
	buf.WriteString(`,"AutonomousSystemOrganization":`)
	fflib.WriteJsonString(buf, string(mj.AutonomousSystemOrganization))
	buf.WriteString(`,"ISP":`)
	fflib.WriteJsonString(buf, string(mj.ISP))
	buf.WriteString(`,"Organization":`)
	fflib.WriteJsonString(buf, string(mj.Organization))
	buf.WriteByte('}')
	return nil
}
Example #11
0
func (mj *OutMsg) 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(`,"data":`)
	/* Interface types must use runtime reflection. type=interface {} kind=interface */
	err = buf.Encode(mj.Data)
	if err != nil {
		return err
	}
	buf.WriteByte('}')
	return nil
}
Example #12
0
func (mj *LocGeom) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"lat":`)
	fflib.AppendFloat(buf, float64(mj.Lat), 'g', -1, 64)
	buf.WriteString(`,"lng":`)
	fflib.AppendFloat(buf, float64(mj.Lon), 'g', -1, 64)
	buf.WriteByte('}')
	return nil
}
Example #13
0
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
}
Example #14
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
}
Example #15
0
func (mj *LogoInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"Path":`)
	fflib.WriteJsonString(buf, string(mj.Path))
	buf.WriteString(`,"Name":`)
	fflib.WriteJsonString(buf, string(mj.Name))
	buf.WriteByte('}')
	return nil
}
Example #16
0
func (mj *Viewport) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"width":`)
	fflib.AppendFloat(buf, float64(mj.Width), 'g', -1, 64)
	buf.WriteString(`,"height":`)
	fflib.AppendFloat(buf, float64(mj.Height), 'g', -1, 64)
	buf.WriteByte('}')
	return nil
}
Example #17
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
}
Example #18
0
func (mj *Pos2D) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"x":`)
	fflib.AppendFloat(buf, float64(mj.X), 'g', -1, 64)
	buf.WriteString(`,"y":`)
	fflib.AppendFloat(buf, float64(mj.Y), 'g', -1, 64)
	buf.WriteByte('}')
	return nil
}
Example #19
0
func (mj *LocResult) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"components":`)

	{

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

	}
	if mj.Geometry != nil {
		buf.WriteString(`,"geometry":`)

		{

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

		}
	} else {
		buf.WriteString(`,"geometry":null`)
	}
	buf.WriteByte('}')
	return nil
}
Example #20
0
func (mj *Server) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	/* Falling back. type=map[int]*chat.Topic kind=map */
	buf.WriteString(`{"users":`)
	err = buf.Encode(mj.Topics)
	if err != nil {
		return err
	}
	buf.WriteByte('}')
	return nil
}
Example #21
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
}
func (mj *Backend) 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('}')
	return nil
}
Example #23
0
func (mj *DrawList) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"cpPrey":`)
	if mj.CPP != nil {
		buf.WriteString(`[`)
		for i, v := range mj.CPP {
			if i != 0 {
				buf.WriteString(`,`)
			}

			{

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

			}
		}
		buf.WriteString(`]`)
	} else {
		buf.WriteString(`null`)
	}
	buf.WriteString(`,"vp":`)
	if mj.VP != nil {
		buf.WriteString(`[`)
		for i, v := range mj.VP {
			if i != 0 {
				buf.WriteString(`,`)
			}

			{

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

			}
		}
		buf.WriteString(`]`)
	} else {
		buf.WriteString(`null`)
	}
	/* Struct fall back. type=colour.RGB256 kind=struct */
	buf.WriteString(`,"bg":`)
	err = buf.Encode(&mj.BG)
	if err != nil {
		return err
	}
	buf.WriteString(`,"cpPrey-pop-string":`)
	fflib.WriteJsonString(buf, string(mj.CpPreyPop))
	buf.WriteString(`,"vp-pop-string":`)
	fflib.WriteJsonString(buf, string(mj.VpPop))
	buf.WriteString(`,"turncount-string":`)
	fflib.WriteJsonString(buf, string(mj.TurnCount))
	buf.WriteByte('}')
	return nil
}
Example #24
0
func (mj *AgentRender) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"agent-type":`)
	fflib.WriteJsonString(buf, string(mj.Type))
	buf.WriteString(`,"position":`)

	{

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

	}
	buf.WriteString(`,"heading":`)
	fflib.AppendFloat(buf, float64(mj.Heading), 'g', -1, 64)
	/* Struct fall back. type=colour.RGB256 kind=struct */
	buf.WriteString(`,"colour":`)
	err = buf.Encode(&mj.Colour)
	if err != nil {
		return err
	}
	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
}
func (mj *ResponseCountry) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{ `)
	if mj.Data != nil {
		if true {
			buf.WriteString(`"Data":`)

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

			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 *BroIPFields) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"id.orig_h":`)
	fflib.WriteJsonString(buf, string(mj.ID_orig_h))
	buf.WriteString(`,"id.resp_h":`)
	fflib.WriteJsonString(buf, string(mj.ID_resp_h))
	buf.WriteString(`,"src":`)
	fflib.WriteJsonString(buf, string(mj.Src))
	buf.WriteString(`,"dst":`)
	fflib.WriteJsonString(buf, string(mj.Dst))
	buf.WriteByte('}')
	return nil
}
Example #28
0
func (mj *LocComponent) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"city":`)
	fflib.WriteJsonString(buf, string(mj.City))
	buf.WriteString(`,"postcode":`)
	fflib.WriteJsonString(buf, string(mj.PostCode))
	buf.WriteString(`,"county":`)
	fflib.WriteJsonString(buf, string(mj.County))
	buf.WriteString(`,"state":`)
	fflib.WriteJsonString(buf, string(mj.State))
	buf.WriteString(`,"country":`)
	fflib.WriteJsonString(buf, string(mj.Country))
	buf.WriteString(`,"country_code":`)
	fflib.WriteJsonString(buf, string(mj.CountryCode))
	buf.WriteByte('}')
	return nil
}
Example #29
0
func (mj *JsonOffer) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"numeroOffre":`)
	fflib.WriteJsonString(buf, string(mj.Id))
	buf.WriteString(`,"intitule":`)
	fflib.WriteJsonString(buf, string(mj.Title))
	buf.WriteString(`,"datePublication":`)
	fflib.WriteJsonString(buf, string(mj.Date))
	buf.WriteString(`,"salaireTexte":`)
	fflib.WriteJsonString(buf, string(mj.Salary))
	if mj.PartialTime {
		buf.WriteString(`,"tempsPartiel":true`)
	} else {
		buf.WriteString(`,"tempsPartiel":false`)
	}
	buf.WriteString(`,"lieuTexte":`)
	fflib.WriteJsonString(buf, string(mj.Location))
	buf.WriteString(`,"lieux":`)
	if mj.Locations != nil {
		buf.WriteString(`[`)
		for i, v := range mj.Locations {
			if i != 0 {
				buf.WriteString(`,`)
			}
			/* Inline struct. type=struct { Name string "json:\"libelleLieu\"" } kind=struct */
			buf.WriteString(`{ "libelleLieu":`)
			fflib.WriteJsonString(buf, string(v.Name))
			buf.WriteByte('}')
		}
		buf.WriteString(`]`)
	} else {
		buf.WriteString(`null`)
	}
	buf.WriteString(`,"texteHtml":`)
	fflib.WriteJsonString(buf, string(mj.HTML))
	buf.WriteString(`,"nomCompteEtablissement":`)
	fflib.WriteJsonString(buf, string(mj.Account))
	buf.WriteByte('}')
	return nil
}
Example #30
0
func (mj *Location) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	if mj.Cached {
		buf.WriteString(`{"Cached":true`)
	} else {
		buf.WriteString(`{"Cached":false`)
	}
	buf.WriteString(`,"rate":`)

	{

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

	}
	buf.WriteString(`,"results":`)
	if mj.Results != nil {
		buf.WriteString(`[`)
		for i, v := range mj.Results {
			if i != 0 {
				buf.WriteString(`,`)
			}

			{

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

			}
		}
		buf.WriteString(`]`)
	} else {
		buf.WriteString(`null`)
	}
	buf.WriteByte('}')
	return nil
}