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
单引号反序列化时,无法忽略大小写匹配。
请填写以下信息:
如何操作可以重现该问题:
{ 'user_NAme': "xxx", "age": "xx"}
字段name值为null
String jsonStr2 = "{ 'user_Name': \"xxx\", \"age\": \"xx\"}"; // 1.x版本 JSONField1VO jsonField1VO2 = com.alibaba.fastjson.JSON.parseObject(jsonStr2, JSONField1VO.class); // 2.x版本 JSONField2VO jsonField2VO2 = JSON.parseObject(jsonStr2, JSONField2VO.class,JSONReader.Feature.SupportSmartMatch); assertNotNull(jsonField1VO2.getName()); assertNotNull(jsonField2VO2.getName());
JSONField2VO.java如下:
import com.alibaba.fastjson2.annotation.JSONField; import lombok.Data; @Data public class JSONField2VO { @JSONField(name = "user_name") private String name; private String age; }
在使用单引号的情况下,忽略大小写也应生效
The text was updated successfully, but these errors were encountered:
fix single quote SupportSmartMatch not work, for issue #3381
9c08f49
ok~
Sorry, something went wrong.
f2f8d10
84bc1cc
https://github.com/alibaba/fastjson2/releases/tag/2.0.57 问题已修复,请用新版本
No branches or pull requests
问题描述
单引号反序列化时,无法忽略大小写匹配。
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
{ 'user_NAme': "xxx", "age": "xx"}
数据字段name值为null
错误JSONField2VO.java如下:
期待的正确结果
在使用单引号的情况下,忽略大小写也应生效
相关日志输出
附加信息
The text was updated successfully, but these errors were encountered: