json-extjs 报错You're trying to decode and invalid JSON

问题描述

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

json-extjs 报错You're trying to decode and invalid JSON的相关文章

anglurjs读取json文件报错

问题描述 anglurjs读取json文件报错 anglurjs读取json文件报错,读取txt则正常,错误信息: SyntaxError: Unexpected token : at Object.parse (native) at oc (http://127.0.0.1:9090/mytest/angular.min.js:14:303) at e.defaults.transformResponse (http://127.0.0.1:9090/mytest/angular.min.js

extjs报错-extjs中create一个window,里面一个panel加html然后加入buttons就报错了。

问题描述 extjs中create一个window,里面一个panel加html然后加入buttons就报错了. extjs中create一个window,里面一个panel加html然后加入buttons就报错了.代码如: createMapWindows: function() { this.mapWin = Ext.create('Ext.window.Window', { title: '点击获取地理位置', height: 550, width: 700, layout: 'auto'

用android studio使用百度SDK定位报错Couldn't load locSDK4d

问题描述 用android studio使用百度SDK定位报错Couldn't load locSDK4d 用eclipes开发的时候直接把文件夹复制到libs下就可以,然后引用下JAR包, 但是在android studio 做同样操作,如下 运行时候就会报错,如下 改文件名不行,求指教. 解决方案 你试试放到同一个工作空间 解决方案二: 忘记在gradle文件中修改jni目录了吧?

mysql-求助。。java程序访问数据库试用AS别名报错Column 'userid' not found.

问题描述 求助..java程序访问数据库试用AS别名报错Column 'userid' not found. 本人小白java程序中访问mysql数据库去掉AS别名就可以正常访问,加上别名就报错Column 'userid' not found. 这个别名很重要..求大神帮助 解决方案 as这个关键字是可以省略的 解决方案二: AS别名指定的是返回的column的名称,要看你在JDBC中是怎么使用的了. 检查下所有使用了userid列名称的地方是否都正确设置了AS 别名了呢. 解决方案三: sp

mysql-mmm搭建报错can't connect to monitor daemon

问题描述 mysql-mmm搭建报错can't connect to monitor daemon

bindingexception-mybatis报错Parameter'params' not fund.

问题描述 mybatis报错Parameter'params' not fund. 1.mybatis报错Parameter'params' not fund.Available parameters ar[param1,page]. 2.接口是这样写的 public int queryCount(@Param("page") CompanyForm page) throws DaoException; 3.实现类是这样引用的 @Override public int queryCou

在myeclipse8.5中加载EXTJS报错

问题描述 在myeclipse8.5中新建项目后,在资源管理器中加入extjs,然后再开发环境中刷新后报错,错误内容如下:"java.lang.StackOverflowError"然后EXTjs中的部分源码中的中文内容变为乱码,不知如何解决,还请各位多多帮忙. 解决方案 解决方案二:引用楼主zzc0527的回复: 在myeclipse8.5中新建项目后,在资源管理器中加入extjs,然后再开发环境中刷新后报错,错误内容如下:"java.lang.StackOverflowE

Extjs报错处理

错误信息: IE:SCRIPT1009: 缺少 '}' FF: SyntaxError: identifier starts immediately after numeric literal ..."id100", "statFlag":"0",stepList:[{"id":100step1,"jobId":100,"stepName":"100step... 出现错误的E

IDEA报错Target level '1.6' is incompatible with source level '1.7'

解决IDEA 编译级别 Error:java: Target level '1.6' is incompatible with source level '1.7'. A target level '1.7' or better is required 打开之后发现有一个编译级别设置的不对 更改如下: 如果上面的方法还是不行的话,就建议你改一下pom文件中的maven插件编译级别,可以通过搜索所有的pom.xml,1.6这个关键词,就看出来了. <profiles> <profile&g