ajax中eval()\JSON.parse()\parseJSON()和evalJSON()?

求解这几个方法的区别ajax中eval()、JSON.parse()、parseJSON()和evalJSON()的区别?
其中eval()、JSON.parse()不用导入js文件
parseJSON()需要json.js文件
evalJSON()需要prototype.js文件
这几个中是不是evalJSON()最常用啊?

2个回答

json本身也是可以运行的js代码。所以可以调用eval来执行,事实上,eval不是专门针对json,任何js代码写成的字符串,都可以用它执行。这个过程相当于js解释器执行代码。
而parse则是纯粹将json视作数据加以解析。它是第三方库提供的。parse的好处是,如果json中包含了恶意代码,parse不会引起严重的安全问题。

JSON对象IE7-不支持,需要倒入json2.js类库

JSON.parse需要字符为标准json格式字符,否则报错,eval不需要。eval有安全问题,除非你保证字符串格式的安全性,只是数据,而不是恶意代码

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
javascript中JSON.parse()函数处理json中的\斜杠转义字符报错
javascript中JSON.parse()函数处理json中的\斜杠转义字符报错 [这是原贴](https://blog.csdn.net/czh500/article/details/101035904 "原贴地址") **直接po图和代码** ![图片说明](https://img-ask.csdn.net/upload/201909/20/1568952198_856.png) ![图片说明](https://img-ask.csdn.net/upload/201909/20/1568953622_583816.png) ![图片说明](https://img-ask.csdn.net/upload/201909/20/1568953400_106623.png) **疑惑** 大家说一下为什么json字符串中包含2个\斜杠和3个\斜杠的情况,JSON.parse()函数在解析时会报错? 而为什么json字符串中包含1个\斜杠和4个\斜杠的情况,JSON.parse()函数却可以正确解析? 谁能帮忙解答一下吗?不吝赐教! [这是我的原贴](https://blog.csdn.net/czh500/article/details/101035904 "这是我的原贴json转义字符的问题"),原贴排版更清晰,大家可以给我留言,帮我把这个问题解释清楚即可,这个问题挺困扰我的! ``` //--------------------------- /* 大家可以试一下写1个\斜杠,或者写2个\斜杠,或者写3个\斜杠,或者写,4个\斜杠,再分 别使用JSON.parse()函数解析一下,效果有很大的不同,有的会报错,有的能正确解析 */ var jsonStr27 = '{"sex":"男","info":"我\\是超人"}'; // 2个\斜杠 var jsonObj75 = eval("(" + jsonStr27 + ")"); //正确 console.log(jsonObj75.sex, jsonObj75.info);//结果为男 我是超人 // var jsonObj76 = JSON.parse(jsonStr27);//报错 // console.log(jsonObj76.sex, jsonObj76.info); var jsonStr68 = '{"sex":"男","info":"我\是超人"}';// 1个\斜杠 var jsonObj90 = eval("(" + jsonStr68 + ")");//正确 var jsonObj77 = JSON.parse(jsonStr68);//正确 console.log(jsonObj77.sex, jsonObj77.info);//结果为男 我是超人 var jsonStr69 = '{"sex":"男","info":"我\\\是超人"}';// 3个\斜杠 var jsonObj91 = eval("(" + jsonStr69 + ")");//正确 // var jsonObj78 = JSON.parse(jsonStr69);//报错 // console.log(jsonObj78.sex, jsonObj78.info); var jsonStr70 = '{"sex":"男","info":"我\\\\是超人"}';// 4个\斜杠 var jsonObj92 = eval("(" + jsonStr70 + ")");//正确 var jsonObj79 = JSON.parse(jsonStr70);//正确 console.log(jsonObj79.sex, jsonObj79.info);//结果为男 我\是超人 //--------------------------------- var jsonStr28 = {"sex":"男","info":"我\\是咸蛋超人"}; console.log(jsonStr28.sex, jsonStr28.info);//结果为男 我\是咸蛋超人 var jsonStr29 = {"sex":"男","info":"我\是孙悟空"}; console.log(jsonStr29.sex, jsonStr29.info);//结果为男 我是孙悟空 var jsonStr30 = {"sex":"男","info":"我\\\是康熙"}; console.log(jsonStr30.sex, jsonStr30.info);//结果为男 我\是康熙 var jsonStr31 = {"sex":"男","info":"我\\\\是小宝"}; console.log(jsonStr31.sex, jsonStr31.info);//结果为男 我\\是小宝 ```
求帮助..怎么把js 数组["大润发A", "大润发B", "大润发C"] 这种形式变成 ['大润发A', '大润发B', '大润发C']
这是ajax 返回data (json字符串) ``` // console.log(data) res = JSON.parse(data); //字符串转成对象 //console.log(res) ///********************************************* //处理这个对象 for (let i = 0; i < res.length; i++) { // console.log(res[i].mendian_code_name) //这是一个数组 var a = res[i].mendian_code_name; console.log(a) var _adrobj = JSON.stringify(a).replace(/\"/g, "'"); //这步能转成单引号 _adrobj = eval("("+_adrobj+")"); //但是 eval 把字符串转回去 又变双引号 用json.,parse 直接报错 console.log(_adrobj); // _adrobj =JSON.parse(_adrobj)//这会报错 // console.log(_adrobj) res[i].mendian_code_name = _adrobj; //处理这个属性完成后 再赋给他!!!!!!!!! } console.log(res) ```
后台返回的list集合,前端如何转为json?
返回值 =》 {addamount=0.00, planned_principal=0.00, product_id=0, plancount=0, repaid_amount=0.00, overdueamount=0.00, planned_interest=0.00, balance_principal=0.00, overpayment=0.00, repaid_interest=0.00, repaycount=0, overduecount=0, addcount=0, feeamount=0.00, name=业主贷, repaid_principal=0.00} eval,JSON.stringify(), JSON.parse()都不能解析;
json字符串转json对象
"[{"money":"4000","name":"0293 5250 0003 5501 1436","id":"598782868439040","endTime":"2017-9-1"},{"money":"16000","name":"0324 2004 0003 9108 9385","id":"598776326848512","endTime":"2018-1-3"},{"money":"80000","name":"0294 6453 0003 5638 3897","id":"595961183551488","endTime":"2017-9-7"}]"这句话怎么转化为json对象var obj = str.parseJSON();与var obj = JSON.parse(str); 还有var obj = eval('(' + str + ')')都试过了还是不行求大神帮忙
ajax请求获得的数据如何传递给外部变量?
请问cnname如何能获取到json.cnname的值? ``` function findTypeName(id){ var cnname; $.ajax({ url:urlheader+"selectTypeById.html", data:{id:id}, datatype:"json", success:function(data){ var json = eval('(' + data + ')'); console.log(json); cnname=json.cnname; } }); return cnname; } ```
Servlet中设置的json,Ajax接收不到
servlet代码: ``` String succ = "false"; JSONObject json = new JSONObject(); json.put("succ", succ); PrintWriter pw = response.getWriter(); System.out.println("json:"+json); pw.print(json.toString()); pw.write(json.toString()); return ; ``` JS代码: ``` $.ajax({ url:url, type:'post', dataType:'json', data:{ email:$('#name').val(), pwd:$("#pwd").val(), pwd2:$("#pwd2").val(), number:$("#number").val(), hoby:a.join(","), check:$("#checked").val() }, success:function(json){ alert("11"); alert(json); /* alert(json); var dd = eval("("+json+")");*/ }, error:function(){ alert("22"); }, }) ``` 最后执行的都是error,不知道是怎么回事! 控制台打印出来josn是:json:{"succ":"false"}
Jmeter断言脚本问题--新人求教
脚本: import org.json.*; import java.util.Arrays; import org.apache.jmeter.assertions; import org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.assertions.AssertionResult; import org.json.simple.JSONArray; import org.json.simple.JSONException; import org.json.simple.JSONObject; import org.json.simple.JSONValue; String jsonString = prev.getResponseDataAsString();//get response JSONObject responseJson = new JSONObject(jsonString);//change to Json String prompt = responseJson.getString("prompt");//get the value of prompt if (!prompt.contains("错误")) { Failure =false; FailureMessage = "失败"; } else { Failure = true; FailureMessage = "成功"; } 返回错误:BeanShell断言 : org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.json.*; import java.util.Arrays; import org.apache.jmeter.assertions; . . . '' : Typed variable declaration : Class: JSONObject not found in namespace
JSON字符串转JSON对象,注意其中desc中要两个,而不是一个
{ "title": "材料輸入","desc":{"處理內容":"","處理內容":""},"wf_type":{"處理內容":"1","處理內容":"1"},"point":{"處理內容":"80,400,250,300","處理內容":"80,300,250,350"},"wf_allowblank":{"處理內容":"N","處理內容":"N"},"wf_radio":{},"wf_radiopoint":{}}" 我试了JSON.parse和eval都不行,转化出来desc中都是一个
JQuery中ajax不能解析json
Action: @Controller @Scope("prototype") @Namespace("/") @ParentPackage("json-default") public class OaAction extends ActionSupport private String name; private String pass; private String msg; @Action(value="/login", results={@Result(name="success",location="/main.jsp"), @Result(name = "login",type="json") }) public String login() { Map<String,Object> map = new HashMap<String,Object>(); if(name=="经理1" && pass=="123456") { //将数据存储在map里,再转换成json类型数据,也可以自己手动构造json类型数据 map.put("flag","true"); map.put("info","欢迎登陆"); JSONObject json = JSONObject.fromObject(map);//将map对象转换成json类型数据 msg = json.toString();//给msg赋值,传递给页面 return SUCCESS; } else { map.put("flag","false"); map.put("info","用户名或者密码错误"); //将map对象转换成json类型数据,在此处打断点json有以下两个属性 nullObject : null; propeties:{flag=false, info=用户名或者密码错误} JSONObject json = JSONObject.fromObject(map); msg = json.toString();//给msg赋值,传递给页面 return "login"; } } @JSON public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public void setName(String name) { this.name = name; } public String getName() { return name; } public String getPass() { return pass; } public void setPass(String pass) { this.pass = pass; } jsp: <div id="lg"> <input type="text" name="username" id="uname"/> <input type="password" name="password" id="password"/> <input type="submit" class="login-sub" value="" id="lgbtn"/> <br /> <div id="msg"></div> </div> $(function(){ $('#lgbtn').click(function(){ var name=document.getElementById("uname").value; var pass=document.getElementById("password").value; $.ajax ({ url:"login.action", dataType:"json", type:"post", data:"name="+name+"&pass="+pass, async:false, success:function(data) { //将数据转换成json类型,可以把data用alert()输出出来看看到底是什么样的结构 alert(data);//弹出对话框的内容为:Object object var d = eval('('+data+')'); alert(""+d.flag+""); //没有弹出对话框 alert(""+d.info+""); }, error:function() { alert("请求失败");//没有报请求失败 } }); }); });
ajax获取Servlet中的JSON的问题。
在js中请求ajax,把jsp中的一个Cno传到Servlet中 ``` $.ajax({ type :"post", url : "ShowDetail?Cno="+Cno, async:false, dataType : "json", success : function(data) { }, error : function() { var student =eval("(" +result +")"); alert(student.Cth1); } }); ``` 在Servlet中获取后台值,并out.print JSON格式 ``` out.print("[{'Cno':'"+Cno+"','Cth1':'"+cd.get(0).getCth1()+"']}); ``` 应该如何通过ajax获取这里面的值 我通过 var student =eval("(" +result +")"); 的方法,但是student.Cth1获取不了值 这里用Error是因为Success没有反应。
我有个str可以用eval函数转为dict,但是不能转为json,是什么原因??一直搞不懂是哪里出了问题
如下 ``` {"rateDetail":{"rateCount":{"total":47,"shop":0,"picNum":9,"used":1},"rateDanceInfo":{"storeType":4,"currentMilles":1578043709272,"showChooseTopic":false,"intervalMilles":25956873440},"rateList":[{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"tmall-grade-t3-18.png","rateDate":"2019-12-30 14:31:47","rateContent":"送来都是要自己手工加工的,好在不算复杂,公司布置,快递发货快","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1071440421810,"aliMallSeller":false,"reply":"","pics":["//img.alicdn.com/bao/uploaded/i4/O1CN014Brfii1G2LxgkFswQ_!!0-rate.jpg"],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:DIY-25#座炮1个","anony":false,"displayUserNumId":0,"goldUser":true,"attributesMap":null,"tradeEndTime":{"date":30,"hours":10,"seconds":41,"month":11,"timezoneOffset":-480,"year":119,"minutes":34,"time":1577673281000,"day":1},"headExtraPic":"","aucNumId":0,"displayUserNick":"无***0","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":3,"gmtCreateTime":{"date":30,"hours":14,"seconds":47,"month":11,"timezoneOffset":-480,"year":119,"minutes":31,"time":1577687507000,"day":1},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-31 18:56:02","rateContent":"买了个大鞭炮颜色很正很喜庆,售后非常好,值得购买。","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1071845394098,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:DIY-46#座炮1个","anony":false,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":30,"hours":11,"seconds":17,"month":11,"timezoneOffset":-480,"year":119,"minutes":31,"time":1577676677000,"day":1},"headExtraPic":"","aucNumId":0,"displayUserNick":"t***7","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":31,"hours":18,"seconds":2,"month":11,"timezoneOffset":-480,"year":119,"minutes":56,"time":1577789762000,"day":2},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"tmall-grade-t2-18.png","rateDate":"2019-12-31 19:26:21","rateContent":"喜欢!质量不错!好看,喜庆","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1071614365367,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:金元宝5个","anony":false,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":31,"hours":19,"seconds":48,"month":11,"timezoneOffset":-480,"year":119,"minutes":25,"time":1577791548000,"day":2},"headExtraPic":"","aucNumId":0,"displayUserNick":"k***9","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":2,"gmtCreateTime":{"date":31,"hours":19,"seconds":21,"month":11,"timezoneOffset":-480,"year":119,"minutes":26,"time":1577791581000,"day":2},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"tmall-grade-t1-18.png","rateDate":"2019-12-30 15:49:11","rateContent":"绒布礼盒小了些,再大点就好了。","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1071452993542,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:绒布-DIY新年礼盒","anony":true,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":30,"hours":15,"seconds":12,"month":11,"timezoneOffset":-480,"year":119,"minutes":48,"time":1577692092000,"day":1},"headExtraPic":"","aucNumId":0,"displayUserNick":"杯***姐","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":1,"gmtCreateTime":{"date":30,"hours":15,"seconds":11,"month":11,"timezoneOffset":-480,"year":119,"minutes":49,"time":1577692151000,"day":1},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-30 10:14:15","rateContent":"不错,好看","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1071876043121,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:鸿福座炮1对35#","anony":false,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":30,"hours":10,"seconds":56,"month":11,"timezoneOffset":-480,"year":119,"minutes":13,"time":1577672036000,"day":1},"headExtraPic":"","aucNumId":0,"displayUserNick":"t***3","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":30,"hours":10,"seconds":15,"month":11,"timezoneOffset":-480,"year":119,"minutes":14,"time":1577672055000,"day":1},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"tmall-grade-t2-18.png","rateDate":"2019-12-24 14:34:23","rateContent":"东西还不错,还会继续关注。祝店家生意兴隆。","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1070955990476,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:烫金座炮1个27#","anony":false,"displayUserNumId":0,"goldUser":true,"attributesMap":null,"tradeEndTime":{"date":24,"hours":14,"seconds":38,"month":11,"timezoneOffset":-480,"year":119,"minutes":33,"time":1577169218000,"day":2},"headExtraPic":"","aucNumId":0,"displayUserNick":"盲***苏","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":2,"gmtCreateTime":{"date":24,"hours":14,"seconds":23,"month":11,"timezoneOffset":-480,"year":119,"minutes":34,"time":1577169263000,"day":2},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-15 13:45:57","rateContent":"包装的很好没有挤压,特别喜庆,价格也很实惠,过年装饰特别有氛围","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1069303488800,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:鸿福座炮1对46#","anony":true,"displayUserNumId":0,"goldUser":true,"attributesMap":null,"tradeEndTime":{"date":15,"hours":13,"seconds":53,"month":11,"timezoneOffset":-480,"year":119,"minutes":44,"time":1576388693000,"day":0},"headExtraPic":"","aucNumId":0,"displayUserNick":"s***3","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":15,"hours":13,"seconds":57,"month":11,"timezoneOffset":-480,"year":119,"minutes":45,"time":1576388757000,"day":0},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"tmall-grade-t1-18.png","rateDate":"2019-12-27 19:52:36","rateContent":"习惯好评 喜庆","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1071333802450,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:金座炮1对26#","anony":false,"displayUserNumId":0,"goldUser":true,"attributesMap":null,"tradeEndTime":{"date":27,"hours":19,"seconds":22,"month":11,"timezoneOffset":-480,"year":119,"minutes":52,"time":1577447542000,"day":5},"headExtraPic":"","aucNumId":0,"displayUserNick":"t***8","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":1,"gmtCreateTime":{"date":27,"hours":19,"seconds":36,"month":11,"timezoneOffset":-480,"year":119,"minutes":52,"time":1577447556000,"day":5},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-15 13:02:50","rateContent":"挺好的很喜庆","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1069516745214,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:鸿福座炮1对35#发光","anony":false,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":14,"hours":18,"seconds":30,"month":11,"timezoneOffset":-480,"year":119,"minutes":1,"time":1576317690000,"day":6},"headExtraPic":"","aucNumId":0,"displayUserNick":"如***c","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":15,"hours":13,"seconds":50,"month":11,"timezoneOffset":-480,"year":119,"minutes":2,"time":1576386170000,"day":0},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-28 19:53:38","rateContent":"盖子有些盖不住,老容易开","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1071462398427,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:金元宝5个","anony":true,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":28,"hours":15,"seconds":30,"month":11,"timezoneOffset":-480,"year":119,"minutes":43,"time":1577519010000,"day":6},"headExtraPic":"","aucNumId":0,"displayUserNick":"谈***1","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":28,"hours":19,"seconds":38,"month":11,"timezoneOffset":-480,"year":119,"minutes":53,"time":1577534018000,"day":6},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-10 08:39:50","rateContent":"好看!喜庆!","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1068964414165,"aliMallSeller":false,"reply":"","pics":["//img.alicdn.com/bao/uploaded/i4/O1CN01wG1pf21XMMjR6b7Mz_!!0-rate.jpg","//img.alicdn.com/bao/uploaded/i2/O1CN01xCkmU21XMMjVPYGEy_!!0-rate.jpg"],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:鸿福座炮1对46#","anony":false,"displayUserNumId":0,"goldUser":true,"attributesMap":null,"tradeEndTime":{"date":10,"hours":8,"seconds":59,"month":11,"timezoneOffset":-480,"year":119,"minutes":38,"time":1575938339000,"day":2},"headExtraPic":"","aucNumId":0,"displayUserNick":"凯***鼠","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":10,"hours":8,"seconds":50,"month":11,"timezoneOffset":-480,"year":119,"minutes":39,"time":1575938390000,"day":2},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":{"videoList":[],"commentId":0,"days":1,"reply":"","commentTime":"2019-12-24 00:10:24","pics":[],"content":"掉金粉掉得厉害,手一拿都沾手上,哎~"},"fromMemory":0,"picsSmall":[],"tmallSweetPic":"tmall-grade-t4-18.png","rateDate":"2019-12-22 13:16:50","rateContent":"质量还可以,挺好看,但还是有一些掉金粉。","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1070955499593,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:烫金座炮1个27#","anony":false,"displayUserNumId":0,"goldUser":true,"attributesMap":null,"tradeEndTime":{"date":22,"hours":12,"seconds":42,"month":11,"timezoneOffset":-480,"year":119,"minutes":28,"time":1576988922000,"day":0},"headExtraPic":"","aucNumId":0,"displayUserNick":"m***9","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":4,"gmtCreateTime":{"date":22,"hours":13,"seconds":50,"month":11,"timezoneOffset":-480,"year":119,"minutes":16,"time":1576991810000,"day":0},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-22 22:41:55","rateContent":"买的和图片差远了,质量还不好","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1070786310037,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:鸿福座炮1对26#发光","anony":true,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":19,"hours":13,"seconds":22,"month":11,"timezoneOffset":-480,"year":119,"minutes":2,"time":1576731742000,"day":4},"headExtraPic":"","aucNumId":0,"displayUserNick":"z***7","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":22,"hours":22,"seconds":55,"month":11,"timezoneOffset":-480,"year":119,"minutes":41,"time":1577025715000,"day":0},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-06 19:35:43","rateContent":"看着很不错,卖家很有耐心服务态度特别好","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1068400873395,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:烫金座炮1个27#","anony":true,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":6,"hours":19,"seconds":6,"month":11,"timezoneOffset":-480,"year":119,"minutes":35,"time":1575632106000,"day":5},"headExtraPic":"","aucNumId":0,"displayUserNick":"睿***9","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":6,"hours":19,"seconds":43,"month":11,"timezoneOffset":-480,"year":119,"minutes":35,"time":1575632143000,"day":5},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-12 20:42:21","rateContent":"宝贝收到了,质量非常好特别漂亮喜欢","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1068921768574,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:烫金座炮1个27#","anony":false,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":12,"hours":20,"seconds":25,"month":11,"timezoneOffset":-480,"year":119,"minutes":41,"time":1576154485000,"day":4},"headExtraPic":"","aucNumId":0,"displayUserNick":"王***顺","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":12,"hours":20,"seconds":21,"month":11,"timezoneOffset":-480,"year":119,"minutes":42,"time":1576154541000,"day":4},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-15 00:33:33","rateContent":"要摆件选了很多个,这个比较满意,不错","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1069243836785,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:财神摆件3号55#","anony":false,"displayUserNumId":0,"goldUser":true,"attributesMap":null,"tradeEndTime":{"date":15,"hours":0,"seconds":37,"month":11,"timezoneOffset":-480,"year":119,"minutes":31,"time":1576341097000,"day":0},"headExtraPic":"","aucNumId":0,"displayUserNick":"肥***曰","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":15,"hours":0,"seconds":33,"month":11,"timezoneOffset":-480,"year":119,"minutes":33,"time":1576341213000,"day":0},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-07 21:11:11","rateContent":"东西超级好,卖家态度也好,快递也快喜欢","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1068295024297,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:烫金座炮1个27#","anony":true,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":7,"hours":21,"seconds":19,"month":11,"timezoneOffset":-480,"year":119,"minutes":10,"time":1575724219000,"day":6},"headExtraPic":"","aucNumId":0,"displayUserNick":"t***7","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":7,"hours":21,"seconds":11,"month":11,"timezoneOffset":-480,"year":119,"minutes":11,"time":1575724271000,"day":6},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-12-05 14:09:31","rateContent":"东西很好,满意!","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1068468134560,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:烫金座炮1个35#","anony":false,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":4,"hours":16,"seconds":46,"month":11,"timezoneOffset":-480,"year":119,"minutes":5,"time":1575446746000,"day":3},"headExtraPic":"","aucNumId":0,"displayUserNick":"几***哇","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"111-11-0,1;","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":5,"hours":14,"seconds":31,"month":11,"timezoneOffset":-480,"year":119,"minutes":9,"time":1575526171000,"day":4},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2019-11-17 19:55:54","rateContent":"材质不是很好,太软了,安上以后容易开。","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1065771217365,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:大号元宝4个","anony":false,"displayUserNumId":0,"goldUser":true,"attributesMap":null,"tradeEndTime":{"date":17,"hours":19,"seconds":54,"month":10,"timezoneOffset":-480,"year":119,"minutes":49,"time":1573991394000,"day":0},"headExtraPic":"","aucNumId":0,"displayUserNick":"t***9","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":17,"hours":19,"seconds":54,"month":10,"timezoneOffset":-480,"year":119,"minutes":55,"time":1573991754000,"day":0},"useful":true,"displayUserRateLink":""},{"auctionPicUrl":"","userInfo":"","displayRatePic":"","dsr":0,"displayRateSum":0,"appendComment":null,"fromMemory":0,"picsSmall":[],"tmallSweetPic":"","rateDate":"2020-01-03 14:21:24","rateContent":"一般","fromMall":true,"userIdEncryption":"","sellerId":735980882,"videoList":[],"displayUserLink":"","id":1071725336425,"aliMallSeller":false,"reply":"","pics":[],"buyCount":0,"userVipLevel":0,"auctionSku":"颜色分类:鸿福座炮1对26#","anony":true,"displayUserNumId":0,"goldUser":false,"attributesMap":null,"tradeEndTime":{"date":1,"hours":16,"seconds":8,"month":0,"timezoneOffset":-480,"year":120,"minutes":24,"time":1577867048000,"day":3},"headExtraPic":"","aucNumId":0,"displayUserNick":"涓***姐","structuredRateList":[],"carServiceLocation":"","userVipPic":"","serviceRateContent":"","memberIcon":"","attributes":"","position":"","cmsSource":"天猫","tamllSweetLevel":0,"gmtCreateTime":{"date":3,"hours":14,"seconds":24,"month":0,"timezoneOffset":-480,"year":120,"minutes":21,"time":1578032484000,"day":5},"useful":true,"displayUserRateLink":""}],"searchinfo":"","from":"search","paginator":{"lastPage":3,"page":1,"items":41},"tags":[]}} ```
poi刷新公式报错class org.apache.poi.ss.formula.eval.MissingArgEval
XSSFFormulaEvaluator.evaluateAllFormulaCells(wb); 使用poi读取excel,刷新公式时报错如下,请教如何解决 java.lang.RuntimeException: Invalid ValueEval type passed for conversion: (class org.apache.poi.ss.formula.eval.MissingArgEval) at org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.collectValue(MultiOperandNumericFunction.java:219) at org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.collectValues(MultiOperandNumericFunction.java:179) at org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.getNumberArray(MultiOperandNumericFunction.java:128) at org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.evaluate(MultiOperandNumericFunction.java:90) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:132) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyAreaEval.getRelativeValue(LazyAreaEval.java:51) at org.apache.poi.ss.formula.LazyAreaEval.getRelativeValue(LazyAreaEval.java:45) at org.apache.poi.ss.formula.eval.AreaEvalBase.getValue(AreaEvalBase.java:128) at org.apache.poi.ss.formula.functions.Sumproduct.evaluateAreaSumProduct(Sumproduct.java:157) at org.apache.poi.ss.formula.functions.Sumproduct.evaluate(Sumproduct.java:77) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:132) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyAreaEval.getRelativeValue(LazyAreaEval.java:51) at org.apache.poi.ss.formula.LazyAreaEval.getRelativeValue(LazyAreaEval.java:45) at org.apache.poi.ss.formula.eval.AreaEvalBase.getValue(AreaEvalBase.java:128) at org.apache.poi.ss.formula.functions.Sumproduct.evaluateAreaSumProduct(Sumproduct.java:157) at org.apache.poi.ss.formula.functions.Sumproduct.evaluate(Sumproduct.java:77) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:132) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:205) at org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator.evaluateFormulaCellValue(BaseXSSFFormulaEvaluator.java:189) at org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator.evaluateFormulaCell(BaseXSSFFormulaEvaluator.java:117) at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateAllFormulaCells(HSSFFormulaEvaluator.java:346) at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateAllFormulaCells(HSSFFormulaEvaluator.java:337) at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateAllFormulaCells(XSSFFormulaEvaluator.java:91) at com.sinosoft.service.pressure.impl.PressureServiceImpl.pressureCalculateTO(PressureServiceImpl.java:1530) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy604.pressureCalculateTO(Unknown Source) at com.sinosoft.controller.pressure.PressureController.pressureCalculateTO(PressureController.java:438) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
Ajax读本地json文件,无法读取问题
求助各位大神,我用ajax读取本地文件读取不出来,不知道是什么原因。 <script type="text/javascript"> var rate1 = []; var rate2 = []; var date = []; $(document).ready(function () { $('#container').load('datablock/data.json'); $.ajax({ type: "get", url: "datablock/data.json", dataType: "json", async: false, success: function(data){ rate1 = data; alert(data); // $.each(data, function(i, n) { // date[i] = n[0]; // rate1[i] = n[1]; // rate2[i] = n[1]; // }); // rate1 = eval("("+data+""); } }) }) 试用了各种方法依旧无法成功,求助。
前台报了这么个错,json数据都有,网上找了好久都找不到,众神谁来帮帮我!!
Uncaught SyntaxError: Unexpected token d in JSON at position 0 at JSON.parse (<anonymous>) at Object.formatItemParamData [as formatter] (eval at <anonymous> (http://localhost:8080/js/jquery-easyui-1.4.1/jquery.min.js:2:2620), <anonymous>:4:19) at Object.renderRow (http://localhost:8080/js/jquery-easyui-1.4.1/jquery.easyui.min.js:9986:13) at Object.render (http://localhost:8080/js/jquery-easyui-1.4.1/jquery.easyui.min.js:9919:26) at _5f6 (http://localhost:8080/js/jquery-easyui-1.4.1/jquery.easyui.min.js:8837:18) at http://localhost:8080/js/jquery-easyui-1.4.1/jquery.easyui.min.js:9422:1 at Object.success (http://localhost:8080/js/jquery-easyui-1.4.1/jquery.easyui.min.js:10128:1) at j (http://localhost:8080/js/jquery-easyui-1.4.1/jquery.min.js:2:27244) at Object.fireWith [as resolveWith] (http://localhost:8080/js/jquery-easyui-1.4.1/jquery.min.js:2:28057) at x (http://localhost:8080/js/jquery-easyui-1.4.1/jquery.min.js:4:21843)
websocket心跳重连失败,回调了onOpen后立刻onClose
``` var urlHead = "http://127.0.0.1:8081";//请求接口url头部 var webSoketHead = "127.0.0.1:8081";//soket链接ip+端口号+项目名称 var userId=loginAccount.accountId; var webSoketUrl = "ws://" + webSoketHead + "/LLWS/"+userId; var socket = null; // 判断当前浏览器是否支持WebSocket if ('WebSocket' in window) { socket = new WebSocket(webSoketUrl); } else { alert('该浏览器不支持本系统即时通讯功能,推荐使用谷歌或火狐浏览器!'); } var id = setInterval(function(){ console.log("心跳连接"); var heartMessage={ "to":{ "id":userId, "type":"heartContent" } } try{ if(socket.readyState != 3){ socket.send(JSON.stringify(heartMessage)); //发送消息倒Socket服务 }else{ heartContent(); init(); socket.send(JSON.stringify(heartMessage)); } }catch(err){ console.log(err); setTimeout(function(){ socket.send(JSON.stringify(heartMessage)); }, 5000); } }, 30000) function heartContent(){ // socket.close(); socket = new WebSocket(webSoketUrl); } function init(){ layui.use('layim', function(layim){ // 连接发生错误的回调方法 socket.onerror = function(res) { console.log("llws连接失败!"); // heartContent(); // init(); }; // 连接成功建立的回调方法 socket.onopen = function(event) { console.log("llws连接成功!"); } // 接收到消息的回调方法 socket.onmessage = function(res) { // console.log("llws收到消息啦:" +res.data); if(res.data == "保持连接中"){ heartCheck.reset(); }else{ res = eval("("+res.data+")"); if(res.type == 'friend' || res.type == 'group'){ layim.getMessage(res); }else{ layim.setFriendStatus(res.id,res.content); } } } // 连接关闭的回调方法 socket.onclose = function(res) { console.log("llws关闭连接!"); // heartContent(); // init(); } }); } ```![图片说明](https://img-ask.csdn.net/upload/201911/15/1573782215_619011.png) ![图片说明](https://img-ask.csdn.net/upload/201911/15/1573782298_769696.png) 服务器刚重启的时候一切都是正常的,时间长了几个小时后吧大概,就出现了readyState永远是3不会变成1了 服务端不断进入@onError ![图片说明](https://img-ask.csdn.net/upload/201911/15/1573782654_761023.png) 求大神解决!
select下拉框的回显问题
$.post('manufacture/queryAllmanu', function(data){ var json = eval("("+data+")"); manu = ""; for(var i=0; i<json.list.length; i++) { <c:forEach var="o" items="${suborders}"> manu = manu + "<option value=\""+json.list[i].id+"\ <c:if test="${json.list[i].id = o.id }">checked="checked"</c:if> ">"+ json.list[i].facture_name+"</option>" //alert(manu); </c:forEach> } $("[name='manufactureid']").append(manu); } ) select下拉框的内容是异步请求,然后又查询出了已选择的内容,请问我该怎样让选择的内容显示已选择呢,另外上面那个代码中js里可以用jstl的foreach循环标签吗?
用react ajax获取到json数据后怎么通过map方法循环输出??
刚开始学react,从react 的ajax方法从后台php中获取返回的数据,并输出,卡在不知道如何输出上了。。代码如下, <script type="text/babel"> class ListGet extends React.Component { constructor() { super(); this.state = {list:''}; } componentDidMount() { this.serverRequest = $.get("listindex.php",function (data,status) { {/*this.setState({ list:(eval('(' + data + ')'))[0].id });*/} const numbers = eval('(' + data + ')'); listItems = numbers.map((numbers) => <li>{numbers.id}</li> ); }.bind(this)); } componentWillUnmount() { this.serverRequest.abort(); } const listItems; render() { return ( <div> {/*this.state.list*/} {listItems} </div> ); } } ReactDOM.render( <ListGet />, document.getElementById('app') ) </script> 我后台返回的是json字符串,我先把它json对象化,然后想用map方法输出,但是怎么写都报错。。我想问下应该怎样写才对??
jquery $.ajax dataType设置为json后还是无法解析
![图片说明](https://img-ask.csdn.net/upload/201608/02/1470101781_15333.png)![图片说明](https://img-ask.csdn.net/upload/201608/02/1470101797_117780.png) 如图,我在后台传了一个json String到前台,为什么在前台ajax中设置了dataType为json后还是没用,data.success输出为undefined,但是我用eval()方法处理后却可以得到data.success的值![图片说明](https://img-ask.csdn.net/upload/201608/02/1470102067_218993.png) ajaxMessage![图片说明](https://img-ask.csdn.net/upload/201608/02/1470103647_369109.png) 我找到原因了,是因为在spring-mvc.xml里面配置了这个![图片说明](https://img-ask.csdn.net/upload/201608/02/1470108737_784492.png) 如果注释掉就可以自动转化了。 有没有大神能告诉哦我,这是为什么啊。。。。 还有,注释掉以后返回的json出现了中文都变成问号了,这怎么办啊。。。
Ajax后台向前台传json或者string类型的数据,前台收到的数据都是object
前台代码: function pay(){ var map = new Map(); $.ajax({ type:"POST",//提交请求的方式 url:"/interface/servlet/paypay",//访问servlet的路径 dataType:"json",//没有这个,将把后台放会的json解析成字符串 data:$('#pay_submit').serialize(),//把内容序列化 async:true,//是否异步 error:function(data) {//请求出错 alert("出错"); }, success:function(data) {//获得返回值 console.log(data.allmap); alert(data.BUSI_DATA.ORDER_FEE); //var json =eval("("+data+")"); var bankForm = document.createElement("form"); bankForm.method = "post"; bankForm.action = "http://211.103.90.62:7061/payagent/PayUnifiedAccess"; bankForm.id = "IDataForm"; //var json = eval("("+map+")"); //for(var x in json){ var input = document.createElement("input"); input.id = "data"; input.name = "data"; input.type = "hidden"; //input.value ='{"PUB_INFO":{"BUSI_CODE":"1001","OS":"PC","VERIFY_CODE":"a902f90288e4fe8d6e2196499aa90f11b1efd98565f87ce14d9b39701e9d71794bde30a4269e69bd3caf3f754e5c6f9104c67abf207e869210979baf51ce7741f4831ee469e6c76c5828998b0f5d6febf3b95f7f9d9d23908beab2694c7279d52503498a6de5f2109ca68a43f89b3f7068892e29ab5bb34d739acb8fc3d71841"},"BUSI_DATA":{"ORDER_FEE":"1","GOODS_LIST":[{"TOTAL_MONEY":"1","GOODS_PRICE":"100","GOODS_NUM":"1","GOODS_NAME":"诺基亚","GOODS_ID":"0058812","GOODS_ITEM":"1"}],"PEER_TRADE_ID":"2017073011216092","ORDER_DESC":"陈小庆测试","MERCHANT_ID":"1517061200000251","ACCOUNT_CODE":"18322581301","VALID_TIME":"30"}}';// input.value = data; bankForm.appendChild(input); //} document.body.appendChild(bankForm); var submitAction = document.getElementById("IDataForm"); submitAction.submit(); } }); } 后台代码: protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { log.debug("================"); IData goodsInfo=new DataMap(); IDataset goodsList=new DatasetList(); DataMap pubInfo=new DataMap(); DataMap busiDataMap=new DataMap(); DataMap allMap=new DataMap(); goodsInfo.put("GOODS_ITEM", "1"); goodsInfo.put("GOODS_NAME", "诺基亚"); goodsInfo.put("GOODS_PRICE", "100"); goodsInfo.put("GOODS_NUM", "1"); goodsInfo.put("TOTAL_MONEY", "1"); goodsInfo.put("GOODS_ID", "0058812"); goodsInfo.put("TOTAL_MONEY", "1"); goodsList.add(goodsInfo); //goodsList.push(GOODS_LIST=goodsInfo); pubInfo.put("OS", "PC"); pubInfo.put("BUSI_CODE","1001"); busiDataMap.put("PEER_ORDER_ID","2017073011216092"); busiDataMap.put("ORDER_DESC","测试"); busiDataMap.put("ORDER_FEE","1"); busiDataMap.put("VALID_TIME","30"); busiDataMap.put("ACCOUNT_CODE","18322581301"); busiDataMap.put("MERCHANT_ID","1517061200000251");//商户号 busiDataMap.put("GOODS_LIST",goodsList);//商户号 allMap.put("PUB_INFO",pubInfo); allMap.put("BUSI_DATA",busiDataMap); log.debug(allMap); JSONObject json=JSONObject.fromObject(allMap); json.accumulate("data",allMap); req.setCharacterEncoding("utf-8"); resp.setCharacterEncoding("utf-8"); resp.setContentType("text/html"); PrintWriter out=resp.getWriter(); //out.print(JSON.toJSONString(json)); out.print(json.toString()); out.flush(); out.close(); } 后台代码中map包含多个集合,这些参数能直接以json形势传到前台整体取出来吗?求大神指教啊
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
Android 9.0系统新特性,对刘海屏设备进行适配
其实Android 9.0系统已经是去年推出的“老”系统了,这个系统中新增了一个比较重要的特性,就是对刘海屏设备进行了支持。一直以来我也都有打算针对这个新特性好好地写一篇文章,但是为什么直到拖到了Android 10.0系统都发布了才开始写这篇文章呢?当然,一是因为我这段时间确实比较忙,今年几乎绝大部分的业余时间都放到写新书上了。但是最主要的原因并不是这个,而是因为刘海屏设备的适配存在一定的特殊性
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100) 【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
相关热词 c# 引用mysql c#动态加载非托管dll c# 两个表数据同步 c# 返回浮点json c# imap 链接状态 c# 漂亮字 c# 上取整 除法 c#substring c#中延时关闭 c#线段拖拉
立即提问