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
对您想要需求或建议的清晰简洁的描述。 测试代码如下: String str = "{\"infos\": [[]], \"age\": 25}"; Test testb = JSON.parseObject(str, Test.class); System.out.println(testb.getInfos()); Test testa = com.alibaba.fastjson2.JSON.parseObject(str, Test.class); 第一行打印 [null] 第二行报错 Exception in thread "main" com.alibaba.fastjson2.JSONException: expect {, but [, class utils.Info, parent fieldName infos, offset 12, character [, line 1, column 13, fastjson-version 2.0.41 {"infos": [[]], "age": 25}
String str = "{\"infos\": [[]], \"age\": 25}"; Test testb = JSON.parseObject(str, Test.class); System.out.println(testb.getInfos()); Test testa = com.alibaba.fastjson2.JSON.parseObject(str, Test.class);
[null]
Exception in thread "main" com.alibaba.fastjson2.JSONException: expect {, but [, class utils.Info, parent fieldName infos, offset 12, character [, line 1, column 13, fastjson-version 2.0.41 {"infos": [[]], "age": 25}
测试类 ` public class Test {
private List<Info> infos; private int age; public List<Info> getInfos() { return infos; } public void setInfos(List<Info> infos) { this.infos = infos; } public int getAge() { return age; } public void setAge(int age) { this.age = age; }
}
public class Info { private List name;
public List<String> getName() { return name; } public void setName(List<String> name) { this.name = name; }
} `
对您想要需求或建议的实现方案的详细描述。
对您考虑过的任何替代解决方案或功能的描述。
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered:
fix ObjectReaderBean for issue alibaba#1971
e6a0eea
fix ObjectReaderBean for issue #1971
5110bee
https://github.com/alibaba/fastjson2/releases/tag/2.0.42 问题已修复,请用新版本
Sorry, something went wrong.
yanxutao89
No branches or pull requests
请描述您的需求或者改进建议
对您想要需求或建议的清晰简洁的描述。
测试代码如下:
String str = "{\"infos\": [[]], \"age\": 25}"; Test testb = JSON.parseObject(str, Test.class); System.out.println(testb.getInfos()); Test testa = com.alibaba.fastjson2.JSON.parseObject(str, Test.class);
第一行打印
[null]
第二行报错
Exception in thread "main" com.alibaba.fastjson2.JSONException: expect {, but [, class utils.Info, parent fieldName infos, offset 12, character [, line 1, column 13, fastjson-version 2.0.41 {"infos": [[]], "age": 25}
测试类
`
public class Test {
}
public class Info {
private List name;
}
`
请描述你建议的实现方案
对您想要需求或建议的实现方案的详细描述。
描述您考虑过的替代方案
对您考虑过的任何替代解决方案或功能的描述。
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered: