Jericho/ZoomNet

Registrant.CustomQuestions is not deserializing properly

ZaL133 opened this issue ยท 2 comments

ZaL133 commented

Using either the Meetings.GetRegistrantsAsync or Meetings.GetRegistrantAsync methods to retrieve meeting registrants, the custom questions are showing up with empty key/value. Interestingly the correct number of entries are there.

image

Checking the ZoomNet Registrant.CustomQuestions property is of type KeyValuePair<string, string>[].
https://github.com/Jericho/ZoomNet/blob/develop/Source/ZoomNet/Models/Registrant.cs#L120

Looking at the zoom docs, this field doesn't have key/value pair but a title/value pair which is I think the issue: https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetingRegistrants

I'd propose creating a CustomQuestion class with Key/Value properties but set the JsonProperty values to title/value as to not break.

We have a unit test that validates the parsing of the registrant JSON but I just realized that it doesn't verify that the custom questions are properly parsed.

I added the following assertions to the unit test

result.CustomQuestions.ShouldNotBeNull();
result.CustomQuestions.Length.ShouldBe(1);
result.CustomQuestions[0].Key.ShouldBe("What do you hope to learn from this Webinar?");
result.CustomQuestions[0].Value.ShouldStartWith("Look forward to learning");

and, sure enough, the unit test fails because the key and value are null. Exactly as you described.

Let me think about how to fix it.

๐ŸŽ‰ This issue has been resolved in version 0.72.0 ๐ŸŽ‰

The release is available on:

Your GitReleaseManager bot ๐Ÿ“ฆ๐Ÿš€