internal static AutoReminderList getAutoReminderList(HttpResponseMessage response)
 {
     var reminderList = new AutoReminderList();
     var jsonObj = JsonConvert.DeserializeObject<Dictionary<string, object>>(response.Content.ReadAsStringAsync().Result);
     if (jsonObj.ContainsKey("autoreminders"))
     {
         var reminderArray = JsonConvert.DeserializeObject<List<object>>(jsonObj["autoreminders"].ToString());
         foreach(var reminderObj in reminderArray)
         {
             var reminder = new AutoReminder();
             reminder = JsonConvert.DeserializeObject<AutoReminder>(reminderObj.ToString());
             reminderList.Add(reminder);
         }
     }
     return reminderList;
 }
Exemple #2
0
        internal static AutoReminderList getAutoReminderList(HttpResponseMessage response)
        {
            var reminderList = new AutoReminderList();
            var jsonObj      = JsonConvert.DeserializeObject <Dictionary <string, object> >(response.Content.ReadAsStringAsync().Result);

            if (jsonObj.ContainsKey("autoreminders"))
            {
                var reminderArray = JsonConvert.DeserializeObject <List <object> >(jsonObj["autoreminders"].ToString());
                foreach (var reminderObj in reminderArray)
                {
                    var reminder = new AutoReminder();
                    reminder = JsonConvert.DeserializeObject <AutoReminder>(reminderObj.ToString());
                    reminderList.Add(reminder);
                }
            }
            return(reminderList);
        }