Avatar of ITsolutionWizard
ITsolutionWizard
Flag for United States of America

asked on 

json c# mvc

I have a small project with Zoom API. and I am able to create json format and consume API (2nd one below)
but now I do not know how to
          
dynamic obj = new
            {
              action = "cancel"
            };
string jsonString = JsonConvert.SerializeObject(obj, Formatting.Indented);

how to add: id and email into obj above? according to this API: https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarregistrantstatus
 
Below is another API I call to Zoom and it is working. It is just an example I want to show you
This one is working
            https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarregistrantcreate
	    dynamic obj = new
            {
                email = email,
                first_name = first_name,
                last_name = last_name,
                phone = phone
            };
            string jsonString = JsonConvert.SerializeObject(obj, Formatting.Indented);
	    //return format sample = "{\"email\":\"helladsfoworldasdfdd63d86@gmail.com\",\"first_name\":\"Jill\",\"last_name\":\"Chill\",\"phone\":\"(310)597-1111\"}";

 

Open in new window

.NET ProgrammingC#JSON

Avatar of undefined
Last Comment
Kyle Abrahams, PMP

8/22/2022 - Mon