C# svc service can not accept body fields named "object" or "event"

Hi,
I have a problem with the join end webhook event.
the “event” element in the body and the "object " element, c# they are a basic type.
So i can not have thoose fields in my class to using it in a body of my post method.
Can you help me

this the class for the body:

public struct Object
{
    public string id { get; set; }
    public string uuid { get; set; }
    public string host_id { get; set; }
    public string topic { get; set; }
    public int type { get; set; }
    public string start_time { get; set; }
    public string timezone { get; set; }
    public int duration { get; set; }
    public Participant partecipant { get; set; }
}

public struct  Payload
{
    public string account_id { get; set; }

    public Object _object { get; set; }

}
– In here the compiler give me an error because “event” and “object” are
Basic types in c# and if i change the name like “event_” i receive null value in it

public class JoinEndEvent
{
    
    public string  event { get; set; }

    public long event_ts{ get; set; }
    public Payload payload { get; set; }

    public static explicit operator JoinEndEvent (JToken v)
    {
        throw new NotImplementedException();
    }


}

interface is :slight_smile:
[OperationContract]
[WebInvoke(Method = “POST”, ResponseFormat = WebMessageFormat.Json,
UriTemplate = “rsJoinEndEvent”)]
void rsJoinEndEvent(JoinEndEvent JoinEnd);

and method is:

public void rsJoinEndEvent(JoinEndEvent jee)
{


	XmlJeEvent(jee);
}

thanks in advance

Hi @pelosigianni1 ,

Happy to help! This forum has some helpful direction on using c# for listening to webhook events:Newbie Webhook Basics / Example. Let me know if this helps.

Gianni