Yako

Results comments of Yako

请问你用的是那个版本?有试过最新版本没有?

你说报错的是这个场景吗?下面的测试是没有问题的 public void test_1() throws Exception { VO v = new VO(); v.setC(String.class); ``` String json = JSON.toJSONString(v); System.out.println(json); VO v1 = JSON.parseObject(json, VO.class); System.out.println(v1.getC()); } public static class VO...

使用的版本是哪个?我简单做了个测试,WriteNullStringAsEmpty是生效的,你参考一下: public void test() throws Exception { V0 v = new V0(); ``` SerializeConfig mapping = new SerializeConfig(); mapping.setAsmEnable(false); String text = JSON.toJSONString(v, mapping, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty); Assert.assertEquals("{\"value\":\"\"}", text); } public...

检查你的getter和setter方法是否和属性名匹配。 类似: public String getPName() { return pName; } public void setPName(String pName) { this.pName = pName; } 如果,getter和setter正确,还不能正常序列化,联系我~

能补充说明试一下,如何重现吗?我这里序列化和反序列化都未重现

请使用最新版本 1.1.46 或1.2.2

请使用最新版本 1.1.46 或1.2.2