We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fastjson中JSONObject.parse 与Fastjson2有差异
import com.alibaba.fastjson2.JSONException; import com.alibaba.fastjson2.JSONObject; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertThrows; public class Issue2155Mutated_241 { @Test public void test() { assertThrows( JSONException.class, () -> JSONObject.parse("{[1,2]}")); } @Test public void test1() { assertThrows( com.alibaba.fastjson.JSONException.class, () -> com.alibaba.fastjson.JSONObject.parse("{[1,2]}")); } }
{[1,2]} is an invalid json on https://jsonlint.com/ fastjson does not throw any exception
{[1,2]}
Expected com.alibaba.fastjson.JSONException to be thrown, but nothing was thrown.
The text was updated successfully, but these errors were encountered:
这个兼容API处理异常json的错误优先级不高,晚些时间再处理哈
Sorry, something went wrong.
add testcase for issue #2522
3f87e48
No branches or pull requests
问题描述
Fastjson中JSONObject.parse 与Fastjson2有差异
环境信息
重现步骤
期待的正确结果
{[1,2]}
is an invalid json on https://jsonlint.com/fastjson does not throw any exception
相关日志输出
Expected com.alibaba.fastjson.JSONException to be thrown, but nothing was thrown.
The text was updated successfully, but these errors were encountered: