fastjson可正常反序列化字符串null

踩坑:FastJson可正常反序列化字符串null,返回null,而不会抛出JsonException异常

try {
    User user = JSON.parseObject("null", User.class);
    if (user == null) {
        System.out.print("user = null");
    }
} catch (Exception e) {
    e.printStackTrace();
}
public class User {
    private String name;
}
上一篇 fastjson生成json时Null属性不显示
下一篇 fastjson支持配置的PropertyNamingStrategy四种策略
目录
文章列表
1 Magento SMTP扩展配置
Magento SMTP扩展配置
2
AWS Transfer Family 搭建SFTP服务器
AWS Transfer Family 搭建SFTP服务器
3
React Native学习之Touchable类组件
React Native学习之Touchable类组件
4
安装Docker报Transaction check error解决
安装Docker报Transaction check error解决
5
Bigcommerce支付网关设计
Bigcommerce支付网关设计
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。