// MarshalJSON returns the JSON encoding of an Item/ItemGroup.
MarshalJSON returns the JSON encoding of an Item/ItemGroup.
// MarshalJSON returns the JSON encoding of an Item / ItemGroup .
func (i Items) MarshalJSON() ([]byte, error) {
	if i.IsGroup() {
		return json.Marshal(ItemGroup{
			Name:                    i.Name,
			Description:             i.Description,
			Variables:               i.Variables,
			Event:                   i.Event,
			ProtocolProfileBehavior: i.ProtocolProfileBehavior,
			Items:                   i.Items,
			Auth:                    i.Auth,
		})
	}
	return json.Marshal(Item{
		Name:                    i.Name,
		Description:             i.Description,
		Variables:               i.Variables,
		Event:                   i.Event,
		ProtocolProfileBehavior: i.ProtocolProfileBehavior,
		ID:                      i.ID,
		Request:                 i.Request,
		Response:                i.Response,
	})
}
func ( i Items ) MarshalJSON ( ) ( [ ] byte , error ) { if i . IsGroup ( ) { return json . Marshal ( ItemGroup { Name : i . Name , Description : i . Description , Variables : i . Variables , Event : i . Event , ProtocolProfileBehavior : i . ProtocolProfileBehavior , Items : i . Items , Auth : i . Auth , } ) } return json . Marshal ( Item { Name : i . Name , Description : i . Description , Variables : i . Variables , Event : i . Event , ProtocolProfileBehavior : i . ProtocolProfileBehavior , ID : i . ID , Request : i . Request , Response : i . Response , } ) }
MarshalJSON returns the JSON encoding of an Item/ItemGroup.
MarshalJSON returns the JSON encoding of an Item / ItemGroup .