NIMSDK-AOS  9.16.0
NotificationAttachmentWithExtension.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.msg.attachment;
2 
3 import com.netease.nimlib.session.MsgHelper;
4 import com.netease.nimlib.util.JSONHelper;
5 
6 import org.json.JSONObject;
7 
8 import java.util.Map;
9 
11  private static final String TAG_ATTACH = "attach";
12 
16  protected Map<String, Object> extension;
17 
18  public Map<String, Object> getExtension() {
19  return extension;
20  }
21 
22  @Override
23  public void parse(JSONObject json) {
24  if (json.has(TAG_ATTACH)) {
25  extension = MsgHelper.getMapFromJsonString(JSONHelper.getString(json, TAG_ATTACH));
26  }
27  }
28 }