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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
简要描述您碰到的问题。 首字母大写字段无法parse。fastjson1.0可以支持,大家切换2.0一定要甚重,不建议切换不建议切换。
请填写以下信息:
如何操作可以重现该问题:
xxx.xxx
...
@Test public void test2() { String s = "{\"OneDemo\":\"1\",\"TDemo\":\"2\",\"ThDemo\":\"3\"}"; TestModel testModel = JSON.parseObject(s, TestModel.class); System.out.println(testModel); } @Setter class TestModel { private String OneDemo; private String TDemo; private String ThDemo; @Override public String toString() { return "TestModel{" + "OneDemo='" + OneDemo + '\'' + ", TDemo='" + TDemo + '\'' + ", ThDemo='" + ThDemo + '\'' + '}'; } }
对您期望发生的结果进行清晰简洁的描述。 期望parse成功
请复制并粘贴任何相关的日志输出。 TestModel{OneDemo='null', TDemo='2', ThDemo='null'}
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered:
JSONReader.Feature.SupportSmartMatch 用这个可以自动识别
TestModel testModel = JSON.parseObject(s, TestModel.class, JSONReader.Feature.SupportSmartMatch);
Sorry, something went wrong.
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.21-SNAPSHOT/ 问题已修复,不用加JSONReader.Feature.SupportSmartMatch,可以直接支持,请帮用快照版本验证
https://github.com/alibaba/fastjson2/releases/tag/2.0.21 问题已修复,请用新版本
No branches or pull requests
问题描述
简要描述您碰到的问题。
首字母大写字段无法parse。fastjson1.0可以支持,大家切换2.0一定要甚重,不建议切换不建议切换。
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
xxx.xxx
方法...
数据...
错误期待的正确结果
对您期望发生的结果进行清晰简洁的描述。
期望parse成功
相关日志输出
请复制并粘贴任何相关的日志输出。
TestModel{OneDemo='null', TDemo='2', ThDemo='null'}
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered: