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
#235, 字符串多了一个 '}',fastjson兼容JSON.parseArray未报错
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONException; import org.junit.jupiter.api.Test; import java.util.List; import static org.junit.jupiter.api.Assertions.assertThrows; public class Issue235 { @Test public void testOriginalJsonParsing() { String json = "[{\r\n" + " \"namespace\":\"unit07\", \r\n" + " \"items\":[\"COUNTER13_14.AV\",\r\n" + " \"COUNTER13_15.AV\"]\r\n" + "}\r\n" + "}]"; assertThrows(JSONException.class, () -> JSON.parseArray(json, TModal.class)); } public static class TModal { private String namespace; private List<String> items; } }
Maybe should throw an exception
Expected com.alibaba.fastjson.JSONException to be thrown, but nothing was thrown.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述
#235, 字符串多了一个 '}',fastjson兼容JSON.parseArray未报错
环境信息
重现步骤
期待的正确结果
Maybe should throw an exception
相关日志输出
Expected com.alibaba.fastjson.JSONException to be thrown, but nothing was thrown.
The text was updated successfully, but these errors were encountered: