using System.Collections.Generic;
public class UserNotificationModel
public int ItemId { get; set; }
public int FeedItemType { get; set; }
public int ActionType { get; set; }
public int NewQuestions { get; set; }
public int NewMeetings { get; set; }
public int NewFeedbacks { get; set; }
public int NewInspirations { get; set; }
public int NewDilemmas { get; set; }
return this.NewQuestions + this.NewMeetings + this.NewFeedbacks + this.NewInspirations + this.NewDilemmas;
public static void Main()
var notificationModel = new UserNotificationModel();
notificationModel.NewQuestions = 1;
notificationModel.NewFeedbacks = 2;
notificationModel.NewInspirations = 3;
notificationModel.NewDilemmas = 4;
notificationModel.ItemId = 123;
notificationModel.FeedItemType = 456;
notificationModel.ActionType = 2;
to = "fAVuRxZrXbA:APA91bGTuBnW1ZvJ9VvgzXcFDObFjffyX7_2VxbM06oQfoHWelcgIIs_Dw5EIzDSj-4dhTqGcZBng-ac9djTQ0kcqeSiKF2WpSmH7lFzlS35n86d_781aQiSK9B-joglOSGKYtINkzUU",
itemInfoContent = new Dictionary<string, object>
{ "item_id", notificationModel.ItemId },
{ "item_type", notificationModel.FeedItemType },
{ "action_type", notificationModel.ActionType }
bagesInfo = new Dictionary<string, object>
{ "new_questions", notificationModel.NewQuestions },
{ "new_meetings", notificationModel.NewMeetings },
{ "new_feedbacks", notificationModel.NewFeedbacks },
{ "new_inspirations", notificationModel.NewInspirations },
{ "new_dilemmas", notificationModel.NewDilemmas }
var postData = Newtonsoft.Json.JsonConvert.SerializeObject(data);
Console.WriteLine(postData);