protostuff icon indicating copy to clipboard operation
protostuff copied to clipboard

List has a empty list , but deserialize is null

Open canrly opened this issue 4 years ago • 4 comments

hello,my test case

Student student = new Student(); student.setId("1"); student.setNames(Lists.newArrayList());

but names deserialize is null, i expect is emptyList , what should i do? thank u ,i am a newcomer

canrly avatar Jan 12 '22 11:01 canrly

IdStrategy strategy = new DefaultIdStrategy(IdStrategy.DEFAULT_FLAGS | IdStrategy.COLLECTION_SCHEMA_ON_REPEATED_FIELDS ,null,0); schema = RuntimeSchema.createFrom(originClazz, strategy);

xiaolyuh123 avatar Sep 28 '22 05:09 xiaolyuh123

IdStrategy.DEFAULT_FLAGS | IdStrategy.COLLECTION_SCHEMA_ON_REPEATED_FIELDS ,null,0

哥们,你的proto-stuff用的是哪个版本?我用的1.1.0没有这两个取值。

wangsansan avatar Sep 29 '22 06:09 wangsansan

可以看下源码里面的pom文件

发自我的iPhone

在 2022年9月29日,14:44,wangsansan @.***> 写道:

 IdStrategy.DEFAULT_FLAGS | IdStrategy.COLLECTION_SCHEMA_ON_REPEATED_FIELDS ,null,0

哥们,你的proto-stuff用的是哪个版本?我用的1.1.0没有这两个取值。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

xiaolyuh123 avatar Sep 29 '22 09:09 xiaolyuh123

https://groups.google.com/g/protostuff/c/tYOdTSUvg_Q/m/eHJr6HwmbmoJ

jxau-hujin avatar Oct 09 '22 10:10 jxau-hujin