com.alibaba.fastjson.JSONException.printStackTrace()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(166)

本文整理了Java中com.alibaba.fastjson.JSONException.printStackTrace()方法的一些代码示例,展示了JSONException.printStackTrace()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONException.printStackTrace()方法的具体详情如下:
包路径:com.alibaba.fastjson.JSONException
类名称:JSONException
方法名:printStackTrace

JSONException.printStackTrace介绍

暂无

代码示例

代码示例来源:origin: GitLqr/LQRWeChat

return false;
} catch (JSONException e) {
  e.printStackTrace();
  return false;

代码示例来源:origin: iflytek/Guitar

jo.put(key, value);
} catch (JSONException e) {
  e.printStackTrace();

代码示例来源:origin: iflytek/Guitar

jo.put(key, value);
} catch (JSONException e) {
  e.printStackTrace();

代码示例来源:origin: huangfangyi/FanXin

@Override
  public void run() {
    boolean isChange = false;
    try {
      JSONObject jsonObject = JSONObject.parseObject(groupName);
      JSONArray jsonArray = jsonObject.getJSONArray("jsonArray");
      for (int i = 0; i < jsonArray.size(); i++) {
        JSONObject userJson = jsonArray.getJSONObject(i);
        if (hxid.equals(userJson.getString("hxid"))) {
          jsonArray.remove(userJson);
          isChange = true;
        }
      }
      if (isChange) {
        jsonObject.put("jsonArray", jsonArray);
        Message message = hanlder.obtainMessage();
        Bundle bundle = new Bundle();
        bundle.putString("groupId", groupId);
        bundle.putString("groupName", jsonObject.toJSONString());
        message.setData(bundle);
        message.what = UPDATE_GROUP_NAME;
        message.sendToTarget();
      }
    } catch (JSONException e) {
      e.printStackTrace();
    }
  }
}).start();

代码示例来源:origin: huangfangyi/FanXin

/**
 * set user's nickname
 */
public static void setUserNick(String username, TextView textView, EMMessage msg) {
  if (textView != null) {
    EaseUser user = getUserInfo(username);
      try {
        String userInfo = msg.getStringAttribute("userInfo");
        JSONObject jsonObject = JSONObject.parseObject(userInfo);
        String nick = jsonObject.getString("nick");
        textView.setText(nick);
      } catch (HyphenateException e) {
        textView.setText(username);
        if (user != null && user.getNick() != null) {
          textView.setText(user.getNick());
        }
        e.printStackTrace();
      } catch (JSONException e) {
        textView.setText(username);
        if (user != null && user.getNick() != null) {
          textView.setText(user.getNick());
        }
        e.printStackTrace();
      }
  }
}

代码示例来源:origin: huangfangyi/FanXin

@Override
public View getView(int position, View convertView, ViewGroup parent) {
  EMMessage message = getItem(position);
  if (convertView == null) {
    convertView = inflater.inflate(R.layout.fx_item_live_chat, parent, false);
  }
  ViewHolder holder = (ViewHolder) convertView.getTag();
  if (holder == null) {
    holder = new ViewHolder();
    holder.tvNick = (TextView) convertView.findViewById(R.id.tv_nick);
    holder.tvContent = (TextView) convertView.findViewById(R.id.tv_content);
    convertView.setTag(holder);
  }
  EMTextMessageBody txtBody = (EMTextMessageBody) message.getBody();
  try {
    String userInfo = message.getStringAttribute(FXConstant.KEY_USER_INFO);
    JSONObject jsonObject = JSONObject.parseObject(userInfo);
    holder.tvNick.setText(jsonObject.getString(FXConstant.JSON_KEY_NICK));
  } catch (HyphenateException e) {
    holder.tvNick.setText(message.getFrom());
    e.printStackTrace();
  } catch (JSONException e) {
    holder.tvNick.setText(message.getFrom());
    e.printStackTrace();
  }
  holder.tvContent.setText(txtBody.getMessage());
  return convertView;
}

代码示例来源:origin: huangfangyi/FanXin

e.printStackTrace();

代码示例来源:origin: huangfangyi/YiChat

e.printStackTrace();

代码示例来源:origin: YiChat/android_YiChat_Lite

e.printStackTrace();

代码示例来源:origin: sealtalk/sealtalk-android

return;
} catch (JSONException e) {
  e.printStackTrace();
  NLog.d(TAG, "getGroupMember occurs JSONException e=" + e.toString() + "groupID=" + groupID);
  return;

代码示例来源:origin: huangfangyi/FanXin

e.printStackTrace();

代码示例来源:origin: huangfangyi/FanXin

e.printStackTrace();

代码示例来源:origin: sealtalk/sealtalk-android

NLog.d(TAG, "fetchGroups occurs HttpException e=" + e.toString() + "groupID=" + groupID);
} catch (JSONException e) {
  e.printStackTrace();
  NLog.d(TAG, "fetchGroups occurs JSONException e=" + e.toString() + "groupID=" + groupID);

代码示例来源:origin: CvvT/AppTroy

e.printStackTrace();

代码示例来源:origin: sealtalk/sealtalk-android

return false;
} catch (JSONException e) {
  e.printStackTrace();
  return false;

相关文章