You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android Kotlin 反序列化时出现
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at com.alibaba.fastjson2.reader.ObjectReaderCreator.createObjectReaderWithCreator(ObjectReaderCreator.java:314)
at com.alibaba.fastjson2.reader.ObjectReaderCreator.createObjectReader(ObjectReaderCreator.java:570)
at com.alibaba.fastjson2.reader.ObjectReaderProvider.getObjectReader(ObjectReaderProvider.java:693)
环境信息
OS信息: 红米K40 Miui13.0.5,小米10s Miui13.0.3
JDK信息: Openjdk 1.8
版本信息:Fastjson2 2.0.4 , kotlin版本 :1.6.0
重现步骤
1.只要调用to或者parseObject方法反序列化就会出现,
data classTestBean(vartest:String =“111”, valtest2:String=“2222”)
val data="{\"test\":\"111\"}".to<TestBean>()//这里就会报错//或者 data classTestBean(vartest:String =“111”, valtest2:String=“2222”)
val dateStr=data.toJSONString()
val data=dataStr.to<TestBean>()//这里就会报错
The text was updated successfully, but these errors were encountered:
D/NET_LOG: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
您好,最新版2.0.19又出现差不多的问题
问题描述
Android Kotlin 反序列化时出现
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at com.alibaba.fastjson2.reader.ObjectReaderCreator.createObjectReaderWithCreator(ObjectReaderCreator.java:314)
at com.alibaba.fastjson2.reader.ObjectReaderCreator.createObjectReader(ObjectReaderCreator.java:570)
at com.alibaba.fastjson2.reader.ObjectReaderProvider.getObjectReader(ObjectReaderProvider.java:693)
环境信息
重现步骤
1.只要调用to或者parseObject方法反序列化就会出现,
The text was updated successfully, but these errors were encountered: