日期:2014-05-16  浏览次数:21007 次

json返回的结果在页面加载的时候异常
数据库中有18条数据,通过hibernate查询转化成json返回到页面,然后通过js解析json数组。
从数据库查询开始我一步步的打印出来数据转化后的个数等情况一直都是18条记录,可是传到页面后数据变成了15条,这是为什么呢?
json数组如下:
HTML code
[
{"content":"<p>&nbsp;sdfsdfasdf<\/p>","id":22,"author":"admin","title":"sdfd","c_id":"jiaoxue","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;sdfasd<\/p>","id":23,"author":"admin","title":"sdffg","c_id":"tongzhi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;ffghhjk<\/p>","id":24,"author":"admin","title":"sdfgg","c_id":"tongzhi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;khj<\/p>","id":25,"author":"admin","title":"jkl","c_id":"tongzhi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;ghjkghj<\/p>","id":26,"author":"admin","title":"jkhlk","c_id":"tongzhi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;ghjkghjk<\/p>","id":27,"author":"admin","title":"ghjgh","c_id":"tongzhi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;jkghjkghk<\/p>","id":28,"author":"admin","title":"ghkghjk","c_id":"tongzhi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;ghjkghjkghjk<\/p>","id":29,"author":"admin","title":"ghjk","c_id":"shixi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;ghjkghjkkghjk<\/p>","id":30,"author":"admin","title":"hgkgh","c_id":"tongzhi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;utryu<\/p>","id":34,"author":"admin","title":"tyu","c_id":"tongzhi","p_time":"2012-5-6","date":"2012-5-6"},{"content":"<p>&nbsp;123123123<\/p>","id":35,"author":"admin","title":"123","c_id":"tongzhi","p_time":"2012-5-7","date":"2012-5-7"},{"content":"<p>&nbsp;456<\/p>","id":36,"author":"admin","title":"456","c_id":"tongzhi","p_time":"2012-5-7","date":"2012-5-7"},{"content":"","id":37,"author":"admin","title":"","c_id":"tongzhi","p_time":"2012-5-7","date":"2012-5-7"},{"content":"<p>&nbsp;qewrqewr<\/p>","id":38,"author":"admin"