fastjson2 icon indicating copy to clipboard operation
fastjson2 copied to clipboard

[BUG] parseArray不能忽略空的值,而是抛出异常

Open Trisitana opened this issue 2 years ago • 2 comments

com.alibaba.fastjson2.JSONException: offset 28, character ,, line 1, column 28, fastjson-version 2.0.52 [[21976997982896132,1000,0,,,0]]

对这个[[21976997982896132,1000,0,,,0]]进行parseArray的时候,在fastjson1中,是会忽略连续的几个逗号的,但是在fastjson2中,会抛出异常,实际上这几个逗号,可能是代表没有值,有没有办法回到fastjson1中的行为(忽略逗号,只匹配有值的数)

Trisitana avatar Sep 20 '24 08:09 Trisitana

I think we should add a "Feature" to enable this, rather than fixing it as the default behavior.

wyTrivail avatar Sep 20 '24 23:09 wyTrivail

yep

---原始邮件--- 发件人: @.> 发送时间: 2024年9月21日(周六) 上午7:17 收件人: @.>; 抄送: @.@.>; 主题: Re: [alibaba/fastjson2] [BUG] parseArray不能忽略空的值,而是抛出异常 (Issue #2977)

I think we should add a "Feature" to enable this, rather than fixing it as the default behavior.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Trisitana avatar Sep 22 '24 10:09 Trisitana