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
Integer和Long类型的 ["123"] 可以解析,Double无法解析,Character会只保留[
["123"]
[
@Test public void jsonSerializationTest3() { String json = "{\n" + " \"c\":[\"1.1\"]\n" + "}"; Bean bean = JSON.parseObject(json, Bean.class); // com.alibaba.fastjson2.JSONException: can not cast to decimal System.out.println(bean.getC()); } @Test public void jsonSerializationTest2() { String json = "{\n" + " \"b\":['1']\n" + "}"; Bean bean = JSON.parseObject(json, Bean.class); System.out.println(bean.getB()); // [ } @Data public static class Bean { private Character b; private Double c; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述
Integer和Long类型的
["123"]
可以解析,Double无法解析,Character会只保留[
环境信息
The text was updated successfully, but these errors were encountered: