1 package com.netease.nimlib.sdk.chatroom.model;
6 import org.json.JSONObject;
16 private static final String TAG_QUEUE_CHANGE =
"queueChange";
17 private static final String TAG_CONTENT =
"content";
18 private static final String TAG_KEY =
"key";
19 private static final String TAG_TYPE =
"_e";
20 private static final String TAG_KEYS =
"kvObject";
21 private Map<String, String> contentMap;
27 private String content;
30 return chatRoomQueueChangeType;
47 public void parse(JSONObject json) {
49 if (json.has(TAG_QUEUE_CHANGE)) {
50 String queueChange = JSONHelper.getString(json, TAG_QUEUE_CHANGE);
51 JSONObject jsonObject = JSONHelper.parse(queueChange);
52 if (jsonObject.has(TAG_TYPE)) {
56 if (jsonObject.has(TAG_KEY)) {
57 key = JSONHelper.getString(jsonObject, TAG_KEY);
60 if (jsonObject.has(TAG_CONTENT)) {
61 content = JSONHelper.getString(jsonObject, TAG_CONTENT);
63 if (jsonObject.has(TAG_KEYS)) {
64 String content = JSONHelper.getString(jsonObject, TAG_KEYS);
65 JSONObject contentJson = JSONHelper.parse(content);
66 contentMap = JSONHelper.parseMapFromJsonObject(contentJson);
Created by winnie on 2017/6/27.
Map< String, String > getContentMap()
ChatRoomQueueChangeType getChatRoomQueueChangeType()
void parse(JSONObject json)
Created by hzxuwen on 2016/12/20.