你是用什么转换的?fastjson就可以啊
User u = new User();
u.setUrl(null);
u.setUserName("孟宪会");
System.out.println(com.alibaba.fastjson.JSON.toJSONString(u));