原因分析: 在transport.js文件中,大概 580行到590行之间,这个句用于格式化json,他重写了object的结构,导致于js框架冲突。冲突的原因是jquery给一个object增加了很多元素,那么在Object.prototype.toJSONString = function () 这个函数中 for (k in this) 语句中进行了无数次的循环,导致网页很卡,并且在IE中会报错。 解决方案: 根本的解决办法是不用transport.js中的json功能,那么就要有一个相
json2.js: This file creates a JSON property in the global object, if there isn't already one, setting its value to an object containing a stringify method and a parse method. The parse method uses the eval method to do the parsing, guarding it with
This file adds these methods to Javascr ipt: array.toJSONString() boolean.toJSONString() date.toJSONString() number.toJSONString() object.toJSONString() string.toJSONString() These methods produce a JSON text from a Javascr ipt value. It must not co
将json字符串转化成JavaBean对象 Person person new Person "1" "fastjson" 1 ; 这里将javabean转化成json字符串 String jsonString JSON toJSONString person ; 这里将json字符串转化成javabean对象 person JSON parseObject jsonString Person class ; 2 将json字符串转化成List对象 Pe