在使用微信支付时,需将从前台接收的JSONObeject 格式数据转换为String类型,其具体的转换过程如下:

 

JSONObject jsonObject = JSONObject.parseObject(XmltoJsonUtil.xml2JSON(content));
JSONObject result_xml = jsonObject.getJSONObject("xml");
JSONArray result_code = result_xml.getJSONArray("result_code");
String code = (String) result_code.get(0);
System.out.println("回调code:activityNotify" + code);

posted on 2018-12-30 23:39  qqzhulu  阅读(2821)  评论(0编辑  收藏  举报