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 Kubernetes修改NodePort的范围
Kubernetes修改NodePort的范围
2
Spring Security OAuth2 JWT 认证服务器配置
Spring Security OAuth2 JWT 认证服务器配置
3
腾讯企业邮箱配置图文教程
腾讯企业邮箱配置图文教程
4
CentOS下源码安装OpenSSL
CentOS下源码安装OpenSSL
5
PHP数组及其操作
PHP数组及其操作
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。