func (mj *TheCountry) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	var scratch fflib.FormatBitsScratch
	_ = scratch
	_ = obj
	_ = err
	buf.WriteString(`{"GeoNameID":`)
	fflib.FormatBits(&scratch, buf, uint64(mj.GeoNameID), 10, false)
	buf.WriteString(`,"IsoCode":`)
	fflib.WriteJsonString(buf, string(mj.IsoCode))
	if mj.Names == nil {
		buf.WriteString(`,"Names":null`)
	} else {
		buf.WriteString(`,"Names":{ `)
		for key, value := range mj.Names {
			fflib.WriteJsonString(buf, key)
			buf.WriteString(`:`)
			fflib.WriteJsonString(buf, string(value))
			buf.WriteByte(',')
		}
		buf.Rewind(1)
		buf.WriteByte('}')
	}
	buf.WriteByte('}')
	return nil
}
Esempio n. 2
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 *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
}
Esempio n. 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
}
Esempio n. 7
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
}
Esempio n. 8
0
func (mj *Error) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{ "error":`)
	fflib.WriteJsonString(buf, string(mj.Code))
	buf.WriteByte(',')
	if len(mj.Description) != 0 {
		buf.WriteString(`"error_description":`)
		fflib.WriteJsonString(buf, string(mj.Description))
		buf.WriteByte(',')
	}
	if len(mj.URI) != 0 {
		buf.WriteString(`"error_uri":`)
		fflib.WriteJsonString(buf, string(mj.URI))
		buf.WriteByte(',')
	}
	buf.Rewind(1)
	buf.WriteByte('}')
	return nil
}
func (mj *EventStream) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"Err":`)
	/* Falling back. type=chan error kind=chan */
	err = buf.Encode(mj.Err)
	if err != nil {
		return err
	}
	buf.WriteString(`,"Events":`)
	/* Falling back. type=chan census.Event kind=chan */
	err = buf.Encode(mj.Events)
	if err != nil {
		return err
	}
	buf.WriteString(`,"Closed":`)
	/* Falling back. type=chan struct {} kind=chan */
	err = buf.Encode(mj.Closed)
	if err != nil {
		return err
	}
	buf.WriteByte('}')
	return nil
}
Esempio n. 10
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(`{"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
}
Esempio n. 11
0
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
}
Esempio n. 12
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
}
Esempio n. 13
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
}
Esempio n. 14
0
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
}
Esempio n. 15
0
func (mj *EventPayload) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if mj == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{"event_name":`)
	fflib.WriteJsonString(buf, string(mj.EventName))
	buf.WriteString(`,"timestamp":`)
	fflib.WriteJsonString(buf, string(mj.Time))
	buf.WriteString(`,"character_id":`)
	fflib.WriteJsonString(buf, string(mj.CharacterID))
	buf.WriteString(`,"world_id":`)
	fflib.WriteJsonString(buf, string(mj.WorldID))
	buf.WriteByte('}')
	return nil
}
Esempio n. 16
0
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
}
Esempio n. 17
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 *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
}
Esempio n. 19
0
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
}
Esempio n. 20
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
}
Esempio n. 21
0
func (mj *Location) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	var err error
	var obj []byte
	var scratch fflib.FormatBitsScratch
	_ = scratch
	_ = obj
	_ = err
	buf.WriteString(`{"Latitude":`)
	buf.Write(strconv.AppendFloat([]byte{}, mj.Latitude, 'g', -1, 64))
	buf.WriteString(`,"Longitude":`)
	buf.Write(strconv.AppendFloat([]byte{}, mj.Longitude, 'g', -1, 64))
	buf.WriteString(`,"MetroCode":`)
	fflib.FormatBits(&scratch, buf, uint64(mj.MetroCode), 10, false)
	buf.WriteString(`,"TimeZone":`)
	fflib.WriteJsonString(buf, string(mj.TimeZone))
	buf.WriteByte('}')
	return nil
}
Esempio n. 22
0
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
}
Esempio n. 23
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
}
Esempio n. 24
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
}
Esempio n. 25
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
}
Esempio n. 26
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
}
Esempio n. 27
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
}
Esempio n. 28
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
}
Esempio n. 29
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
}
Esempio n. 30
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
}