JSONObject json1=new JSONObject();
JSONObject json2=new JSONObject();
json1.accumulate("extEnable",true);
json1.accumulate("extAppid","xxxxxxxxxxxxx");
json1.accumulate("directCommit",false);
json2.accumulate("extAppid","xxxxxxxxxxxxx");
json1.accumulate("ext",json2.toString());
JSONObject json = new JSONObject();
json.accumulate("template_id","4");
json.accumulate("ext_json",json1.toString());
json.accumulate("user_version","v1.1");
json.accumulate("user_desc","first commit");
String retStr="";
retStr=httpClient.postJson(url, json);
数据发送前用json.tostring()把json转成string,"errcode":47001,"errmsg":"data format error hint: [jNVG_a06942372]",一直报这个错误,好几天了都没解决,请各位大神帮忙看看哪里出错了,多谢!!!!!
你好,应该是 ext_json 的问题, 请参考
https://developers.weixin.qq.com/community/develop/doc/000c624e3688382aa0888d69551800