欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

fastjson : java.lang.ArrayIndexOutOfBoundsException: 160

程序员文章站 2022-07-07 13:43:00
...
java.lang.ArrayIndexOutOfBoundsException: 160 
at com.alibaba.fastjson.serializer.SerializeWriter.writeFieldValueStringWithDoubleQuote(SerializeWriter.java:1273) ~[fastjson-1.1.38.jar:na] 
at com.alibaba.fastjson.serializer.SerializeWriter.writeFieldValue(SerializeWriter.java:1133) ~[fastjson-1.1.38.jar:na] 
at Serializer_15.write1(Unknown Source) ~[na:na] 
at Serializer_15.write(Unknown Source) ~[na:na] 
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398) ~[fastjson-1.1.38.jar:na] 
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:376) ~[fastjson-1.1.38.jar:na] 
at com.alibaba.fastjson.serializer.ObjectArraySerializer.write(ObjectArraySerializer.java:111) ~[fastjson-1.1.38.jar:na] 
at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:369) ~[fastjson-1.1.38.jar:na] 
at com.alibaba.fastjson.JSON.toJSONString(JSON.java:418) ~[fastjson-1.1.38.jar:na] 
at com.alibaba.fastjson.JSON.toJSONString(JSON.java:406) ~[fastjson-1.1.38.jar:na] 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_20] 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_20] 

at java.lang.Thread.run(Thread.java:619) [na:1.6.0_20]

 

 

我用JSON.toJSONString(TBean)输出,这个bean,是不是长度太长了?

 
 
fastjson : java.lang.ArrayIndexOutOfBoundsException: 160
            
    
    博客分类: Exception fastjsonArrayIndexOutOfBoundsException特殊字符 stevenjohn
发帖于 1年前
5回/1093阅
 
标签: fastjson : java.lang.ArrayIndexOutOfBoundsException: 160
            
    
    博客分类: Exception fastjsonArrayIndexOutOfBoundsException特殊字符 fastjson
0收藏(0)
 
 

按票数排序  显示最新答案  共有5个答案 (最后回答: 1年前 )

0
0
0
0
    • fastjson : java.lang.ArrayIndexOutOfBoundsException: 160
            
    
    博客分类: Exception fastjsonArrayIndexOutOfBoundsException特殊字符 
       
       
      我用fastjson也有个问题,如果字段名字是大写的话,json格式首字母会被转成小写,gson没有这个问题 
       
       
      评论(0)引用此答案举报 (2014-07-03 16:19)
0

说明:此问题可升级fastgson版本,然后在前端传参中对url做处理(参见http://lihaiming.iteye.com/admin/blogs/2253214)可解决问题