public static EMConversation json2conversation(JSONNode jd) { EMConversation conversation = new EMConversation(); conversation.mConversationId = jd ["mConversationId"].Value; int type = jd ["mConversationType"].AsInt; ConversationType ctype = (ConversationType)type; conversation.mConversationType = ctype; conversation.mUnreadMsgCount = jd ["mUnreadMsgCount"].AsInt; conversation.mExtInfo = jd ["mExt"].Value; string data = jd ["mLatesMsg"].Value; conversation.mLastMsg = json2message(data); return(conversation); }
public static EMConversation json2conversation(JsonData jd) { EMConversation conversation = new EMConversation(); conversation.mConversationId = (string)jd ["mConversationId"]; int type = (int)jd ["mConversationType"]; ConversationType ctype = (ConversationType)type; conversation.mConversationType = ctype; conversation.mUnreadMsgCount = (int)jd ["mUnreadMsgCount"]; conversation.mExtInfo = (string)jd ["mExt"]; string data = (string)jd ["mLatesMsg"]; conversation.mLastMsg = json2message(data); return(conversation); }