问题描述
- extjs 报错You're trying to decode and invalid JSON
-
IE报错:You're trying to decode and invalid JSON String: {"ganttTask":{"baseline_end_date":null,"baseline_start_date":null,"duration":0.0,"duration_unit":null,"end_date":null,"id":4,"index":3,"name":"New Task","other_field":null,"parent_id":null,"percent_done":100,"pid":7,"priority":null,"start_date":null,"task_id":"JMPAR000007"},"ganttTaskList":[{"baseline_end_date":null,"baseline_start_date":null,"duration":0.0,"duration_unit":null,"end_date":"2015-07-23","id":1,"index":1,"name":"New Task","other_field":","parent_id":null,"percent_done":100,"pid":7,"priority":null,"start_date":"2015-07-02","task_id":"JMPAR000007"},{"baseline_end_date":null,"baseline_start_date":null,"duration":0.0,"duration_unit":null,"end_date":null,"id":2,"index":4,"name":"New Task","other_field":null,"parent_id":null,"percent_done":0,"pid":7,"priority":null,"start_date":null,"task_id":"JMPAR000007"},{"baseline_end_date":null,"baseline_start_date":null,"duration":0.0,"duration_unit":null,"end_date":"2015-07-29","id":3,"index":2,"name":"New Task","other_field":null,"parent_id":null,"percent_done":0,"pid":7,"priority":null,"start_date":"2015-07-01","task_id":"JMPAR000007"},{"baseline_end_date":null,"baseline_start_date":null,"duration":0.0,"duration_unit":null,"end_date":null,"id":4,"index":3,"name":"New Task","other_field":null,"parent_id":null,"percent_done":100,"pid":7,"priority":null,"start_date":null,"task_id":"JMPAR000007"}],"signTask":null,"success":true,"taskCount":0,"taskList":null,"task_id":"JMPAR000007"}如果date里有日期它就不报错。为什么?
Ext.define('GanttTask', { extend: 'Ext.data.Model', fields: [ {name: 'task_id', type: 'string'}, {name: 'name', type: 'string'}, {name: 'percent_done', type: 'int'}, {name: 'start_date', type: 'string'}, {name: 'end_date', type: 'string'}, {name: 'other_field', type: 'string'}, {name: 'duration', type: 'string'}, {name: 'pid', type: 'int'}, {name: 'index', type: 'int'} ] }); var adstore = Ext.create('Ext.data.Store', { remoteSort: true, //设置分页大小 remoteFilter : true, model: 'GanttTask', proxy: { type: 'ajax', url: 'taskList_query.action?task_id='+task_id, reader: { type: 'json', root: 'ganttTaskList', //获取数据总数 totalProperty: 'totalCount' } }, autoLoad: false } );
解决方案
"name":"New Task","other_field":","parent_id":null,
看看"other_field":",",这个json格式不对了
可以上在线网站校验
http://www.bejson.com/
解决方案二:
你的json格式有问题导致的,网上有json解析工具你可以试试
解决方案三:
就是你的json格式不对导致的,你可以用一些json的解析工具,检测一下你的json格式
解决方案四:
很明显json格式不正确
解决方案五:
就是in session检测失败了,重新录一下登录脚本
scan-configruation-login -record
用户登陆
......
答案就在这里:Rational AppScan Standard has detected it is out-of-session and is trying to re-login
时间: 2024-09-20 17:19:07