-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG] JSONB 序列化特定的JSON是报数组溢出错误 #744
Comments
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.13-SNAPSHOT/ |
测试了 fastjson2-2.0.13-20220907.220828-61.jar |
我本地测试已经是修复,能更新到fastjson2-2.0.13-20220909.000016-65.jar 再帮忙验证下么? 如果还是报错,提供下更新后错误堆栈信息 |
https://github.com/alibaba/fastjson2/releases/tag/2.0.13 |
可以了👍 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
问题描述
JSONB 序列化特定的JSON是报数组溢出错误,测试JOSN文件在
test.json.zip
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
JSONB.toBytes
方法附件中的test.json
数据期待的正确结果
别爆出异常
相关日志输出
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 274141 out of bounds for byte[274140]
at java.base/java.lang.System.arraycopy(Native Method)
at com.alibaba.fastjson2.JSONWriterJSONB.writeString(JSONWriterJSONB.java:575)
at com.alibaba.fastjson2.writer.ObjectWriterImplMap.writeJSONB(ObjectWriterImplMap.java:257)
at com.alibaba.fastjson2.JSONB.toBytes(JSONB.java:793)
at TestKt.main(Test.kt:15)
at TestKt.main(Test.kt)
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
test.json.zip
The text was updated successfully, but these errors were encountered: