安卓自定义扩展消息String类型传json数据,如何在ios中解析
安卓自定义扩展消息如下解析
string dataType = message.getStringAttribute ("dataType", null);
if (dataType.equals("comment") {
string json_data = message.getStringAttribute("json_data");
JSONObject jsonObject = new JSONObject(json_data);
Log.i("php", "接受到消息" + jsonObject.toString());
}
这样即可解析出来,但是在ios的ext扩展中没有这些字段. 我应该如何在ios中解析这些数据?
string dataType = message.getStringAttribute ("dataType", null);
if (dataType.equals("comment") {
string json_data = message.getStringAttribute("json_data");
JSONObject jsonObject = new JSONObject(json_data);
Log.i("php", "接受到消息" + jsonObject.toString());
}
这样即可解析出来,但是在ios的ext扩展中没有这些字段. 我应该如何在ios中解析这些数据?
没有找到相关结果
已邀请:
2 个回复
ebpangyong
李炎