This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
反序列化枚举,错误的枚举值不抛异常,版本:1.2.36 #1393
Comments
下面是测试案例代码:
测试结果: |
1.2.40也发现了同样的问题,而且当结构化Json后就会抛JSONException异常,不结构化是不抛异常。 |
非法枚举值不抛异常问题,发现只有在JsonArray中对象的key和value之间有空格的话就会抛JSONException异常,没空格的话不抛异常,赋了null值。@wenshao |
最初抛错的,后来改为不抛错,但改的不够彻底(比如你说的有空格的场景)。不抛错有什么问题? |
@wenshao 感谢回复,这个问题会导致我们程序在处理有空格json和无空格json的行为不一致,在1.2.40版本中有没有什么方法可以使fastJson处理非法值时都抛异常? |
希望能有个非法值抛异常的方式 |
Open
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
一个错误的枚举值,反序列化时不抛异常
The text was updated successfully, but these errors were encountered: